Adapt all scripts to work together with build-packages.sh
This commit is contained in:
committed by
Francesco Abbate
parent
91da2ddfdd
commit
261ab5daf2
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
get_platform_name() {
|
||||
if [[ "$OSTYPE" == "msys" ]]; then
|
||||
echo "windows"
|
||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
echo "macos"
|
||||
elif [[ "$OSTYPE" == "linux"* || "$OSTYPE" == "freebsd"* ]]; then
|
||||
echo "linux"
|
||||
else
|
||||
echo "UNSUPPORTED-OS"
|
||||
fi
|
||||
}
|
||||
|
||||
get_default_build_dir() {
|
||||
platform=$(get_platform_name)
|
||||
echo "build-$platform-$(uname -m)"
|
||||
}
|
||||
|
||||
if [[ $(get_platform_name) == "UNSUPPORTED-OS" ]]; then
|
||||
echo "Error: unknown OS type: \"$OSTYPE\""
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user