PortableLinuxGames/unity2AppImage

29 lines
629 B
Bash
Executable File

#!/bin/bash
# Author : Ismael Barros² <ismael@barros2.org>
# License : BSD http://en.wikipedia.org/wiki/BSD_license
pg4l_dir=$(dirname $(readlink -f $0))
if [ -z "$*" ]; then
echo "Usage: $0 [binary]"
exit
fi
binary="$1"
appDir="${binary}.AppDir"
mkdir -p "$appDir" || exit 1
cp -av "$binary" "${binary}_Data" "$appDir" || exit 1
pushd "$appDir"
cp -v "$pg4l_dir"/AppRun_quick AppRun || exit 1
for i in AppRun.desktop AppRun.png; do
{ [ -f "$i" ] || cp -v "$pg4l_dir"/"$i" "$i"; } || exit 1
done
sed -e "s|_BINARY_|$binary|g" AppRun -i
sed -e"s/Name=.*/Name=$binary r1/" AppRun.desktop -i
$pg4l_dir/buildAppImage
popd