summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt4
-rw-r--r--make-tar.sh15
2 files changed, 14 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 197bad8b..482bdb6c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -216,7 +216,9 @@ set(filename_0 "${OPENTRACK_COMMIT}")
string(TIMESTAMP filename_1 "%Y%m%d%H%M%S")
set(filename "${CMAKE_BINARY_DIR}/${filename_0}-${filename_1}.zip")
-add_custom_command(OUTPUT ${filename} COMMAND /usr/bin/env sh "${CMAKE_SOURCE_DIR}/make-tar.sh" "${CMAKE_INSTALL_PREFIX}" "${filename}")
+add_custom_command(OUTPUT ${filename} COMMAND /usr/bin/env sh
+ "${CMAKE_SOURCE_DIR}/make-tar.sh" "${CMAKE_INSTALL_PREFIX}"
+ "${filename}" "${CMAKE_BINARY_DIR}")
add_custom_target(tarball DEPENDS "${filename}")
opentrack_module(opentrack-api opentrack)
diff --git a/make-tar.sh b/make-tar.sh
index 8954a4ba..e831f16a 100644
--- a/make-tar.sh
+++ b/make-tar.sh
@@ -2,16 +2,23 @@
prefix="$1"
filename="$2"
+bin="$3"
-rm -fv "$filename"
+cmake --build "$bin" --target install || exit 1
if : &&
cd $(dirname -- "${prefix}") &&
zip -9r "${filename}" $(basename "${prefix}")
then
- ls -lh -- "${filename}"
- case "$(uname -s)" in
- CYGWIN_*) ls -lh -- "$(cygpath -w -- "$filename")";;
+ case "$USER,$(uname -s)" in
+ # for the script see https://github.com/andreafabrizi/Dropbox-Uploader
+ sthalik,CYGWIN_*)
+ dropbox_uploader.sh -p upload "$filename" / &&
+ l="$(dropbox_uploader.sh share "/$filename")" &&
+ f="$(echo "$l" | tr -d '\n\r' | egrep -o 'https://[^ ]+$')" &&
+ test -n "$f" && { echo "$f"; echo -n "$f" | putclip; }
+ echo -ne '\a' ;;
+ *) ls -lh -- "${filename}" ;;
esac
else
rm -fv -- "${filename}"