#!/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 -- *