diff options
-rwxr-xr-x | distribute.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/distribute.sh b/distribute.sh index 02c0369..a4f63d9 100755 --- a/distribute.sh +++ b/distribute.sh @@ -76,10 +76,10 @@ cd "$CONFIG_INSTALL_PREFIX" # Tarball the finish result! if [ "$WINDOWS" = "true" ]; then - if [ -f "/c/Program Files/7-Zip/7z.exe" ]; + ARCHIVE_NAME="Pong_$(uname -s)-$(uname -r)" + SEVENZIP="$(which 7z)" || SEVENZIP="/c/Program Files/7-Zip/7z.exe" + if [ -f "$SEVENZIP" ]; then # Try to use 7z's self extracting feature if possible. - ARCHIVE_NAME="Pong_$(uname -s)-$(uname -r)" - SEVENZIP="/c/Program Files/7-Zip/7z.exe" "$SEVENZIP" a -sfx7z.sfx "$ARCHIVE_NAME".exe -- * else # If not, just create a standard zip file. zip -9 -r "$ARCHIVE_NAME".zip -- * |