diff options
Diffstat (limited to 'distribute.sh')
-rwxr-xr-x | distribute.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/distribute.sh b/distribute.sh new file mode 100755 index 0000000..71bee81 --- /dev/null +++ b/distribute.sh @@ -0,0 +1,31 @@ +#!/bin/sh -xeu +# This script will detect the OS, and try to grab the libraries. And then +# creates a tarball for distribution. + +# Check if another config is being sourced. +set +u +if [ -z "$TUP_CONFIG" ]; +then + . ./tup.config +else + . ./"$TUP_CONFIG" +fi +set -u + +mkdir -p "$CONFIG_INSTALL_PREFIX/libs" + +case "$(uname -s)" in + + *) + # This is a catch all, above are specific loops for specific platforms. + for i in $(ldd "$CONFIG_BUILD_DIR"/bin/Pong* | awk '/usr/ {print $3}'); + do + cp "$i" "$CONFIG_INSTALL_PREFIX/libs/" + done + ;; +esac +cd "$CONFIG_INSTALL_PREFIX" +rm libs/libGL* # Remove OpenGL as it conflicts with graphics drivers. + +# Tarball the finish result! +bsdtar -caf ../Pong_"$(uname)-$(uname -r)-$(uname -m)".txz -- * |