summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/local/compress_and_upload_deps.sh81
1 files changed, 61 insertions, 20 deletions
diff --git a/contrib/local/compress_and_upload_deps.sh b/contrib/local/compress_and_upload_deps.sh
index ed5d3d0..19350ba 100755
--- a/contrib/local/compress_and_upload_deps.sh
+++ b/contrib/local/compress_and_upload_deps.sh
@@ -32,27 +32,68 @@ ssh ${USCXML_PREBUILT_HOST} mkdir -p ${USCXML_PREBUILT_PATH}/${VERSION}
PLATFORMS=`find . -maxdepth 1 -type d -regex ./[^\.].*`
#PLATFORMS="linux-x86_64"
-PLATFORMS="linux-armv6l"
+#PLATFORMS="linux-armv6l"
#PLATFORMS="darwin-i386"
#PLATFORMS="windows-x86"
+
for FILE in ${PLATFORMS}; do
- PLATFORM=`basename $FILE`
- echo $FILE
- if [ "$PLATFORM" != "include" ]; then
- if [[ "$PLATFORM" == *windows* ]]; then
- tar cvzf uscxml-prebuilt-${PLATFORM}.tgz --exclude='*/.DS_Store' --exclude='VERSION.txt' ${FILE}
- else
- if [[ "$PLATFORM" == *darwin* ]]; then
- tar cvzf uscxml-prebuilt-${PLATFORM}.tgz --exclude='*/.DS_Store' --exclude='VERSION.txt' --exclude='lib/libv8*' --exclude='lib/*_d.a' ${FILE}
- else
- tar cvzf uscxml-prebuilt-${PLATFORM}.tgz --exclude='*/.DS_Store' --exclude='VERSION.txt' --exclude='lib/*_d.a' ${FILE}
- fi
- fi
- scp uscxml-prebuilt-${PLATFORM}.tgz ${USCXML_PREBUILT_HOST}:${USCXML_PREBUILT_PATH}/${VERSION}
- rm uscxml-prebuilt-${PLATFORM}.tgz
- else
- tar cvzf include.tgz --exclude='*/.DS_Store' --exclude='VERSION.txt' ${FILE}
- scp include.tgz ${USCXML_PREBUILT_HOST}:${USCXML_PREBUILT_PATH}/${VERSION}
- rm include.tgz
- fi
+ PLATFORM=`basename $FILE`
+ echo $FILE
+ case "$PLATFORM" in
+ *linux-*-clang* | *darwin-*-gnu* )
+ # do nothing - we will symlink
+ ;;
+ "include")
+ tar cvzf include.tgz --exclude='*/.DS_Store' --exclude='VERSION.txt' ${FILE}
+ scp include.tgz ${USCXML_PREBUILT_HOST}:${USCXML_PREBUILT_PATH}/${VERSION}
+ rm include.tgz
+ ;;
+ *darwin*)
+ cd $FILE
+ # do not upload v8 for mac and strip first dir
+ tar cvzf ../uscxml-prebuilt-${PLATFORM}.tgz --exclude='*/.DS_Store' --exclude='VERSION.txt' --exclude='lib/libv8*' --exclude='lib/*_d.a' *
+ cd ..
+ scp uscxml-prebuilt-${PLATFORM}.tgz ${USCXML_PREBUILT_HOST}:${USCXML_PREBUILT_PATH}/${VERSION}
+ rm uscxml-prebuilt-${PLATFORM}.tgz
+ ;;
+ *linux*)
+ cd $FILE
+ # no debug libs with linux and strip first dir
+ tar cvzf ../uscxml-prebuilt-${PLATFORM}.tgz --exclude='*/.DS_Store' --exclude='VERSION.txt' --exclude='lib/*_d.a' *
+ cd ..
+ scp uscxml-prebuilt-${PLATFORM}.tgz ${USCXML_PREBUILT_HOST}:${USCXML_PREBUILT_PATH}/${VERSION}
+ rm uscxml-prebuilt-${PLATFORM}.tgz
+ ;;
+ *)
+ cd $FILE
+ # and strip first dir
+ tar cvzf ../uscxml-prebuilt-${PLATFORM}.tgz --exclude='*/.DS_Store' --exclude='VERSION.txt' *
+ cd ..
+ scp uscxml-prebuilt-${PLATFORM}.tgz ${USCXML_PREBUILT_HOST}:${USCXML_PREBUILT_PATH}/${VERSION}
+ rm uscxml-prebuilt-${PLATFORM}.tgz
+ ;;
+ esac
+done
+
+# link ABI compatibles
+
+for FILE in ${PLATFORMS}; do
+ PLATFORM=`basename $FILE`
+
+ case "$PLATFORM" in
+ *linux-*-gnu* )
+ # gcc is ABI compatible to clang
+ NEW_PLATFORM="${PLATFORM//gnu/clang}"
+ ssh ${USCXML_PREBUILT_HOST} \
+ ln -s ${USCXML_PREBUILT_PATH}/${VERSION}/uscxml-prebuilt-${PLATFORM}.tgz \
+ ${USCXML_PREBUILT_PATH}/${VERSION}/uscxml-prebuilt-${NEW_PLATFORM}.tgz
+ ;;
+ *darwin-*-clang* )
+ # gcc is ABI compatible to clang
+ NEW_PLATFORM="${PLATFORM//clang/gnu}"
+ ssh ${USCXML_PREBUILT_HOST} \
+ ln -s ${USCXML_PREBUILT_PATH}/${VERSION}/uscxml-prebuilt-${PLATFORM}.tgz \
+ ${USCXML_PREBUILT_PATH}/${VERSION}/uscxml-prebuilt-${NEW_PLATFORM}.tgz
+ ;;
+ esac
done \ No newline at end of file