mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-10 09:32:29 +01:00
30 lines
683 B
Bash
30 lines
683 B
Bash
#!/bin/bash
|
|
set -e
|
|
if [[ "$#" -ne 2 ]]; then
|
|
echo 'Turn an OpenRCT2 cmake install into a portable tar.gz.'
|
|
echo ''
|
|
echo 'Usage: create-portable-build <output-file> <install-path>'
|
|
exit 1
|
|
fi
|
|
|
|
output=$1
|
|
install=$2
|
|
|
|
echo -e "\033[0;36mCreating $output..."
|
|
workdir=$output-temp
|
|
if [[ -d "$workdir" ]]
|
|
then
|
|
rm -rf $workdir
|
|
fi
|
|
|
|
mkdir -p $workdir/OpenRCT2
|
|
cp -r $install/bin/* $workdir/OpenRCT2
|
|
cp -r $install/share/doc $workdir/OpenRCT2
|
|
cp -r $install/share/openrct2 $workdir/OpenRCT2/data
|
|
pushd $workdir > /dev/null
|
|
tar -czf output.tar.gz OpenRCT2
|
|
popd > /dev/null
|
|
mv $workdir/output.tar.gz $output
|
|
rm -rf $workdir
|
|
echo -e "\033[0;32m$output created successfully"
|