mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-12-27 19:04:19 +08:00
883dfac04f
* change the scripts `achievements_gen.py` and `parse_controller_vdf.py` to accept multiple files
29 lines
591 B
Bash
29 lines
591 B
Bash
#!/usr/bin/env bash
|
|
|
|
|
|
if [ "$(id -u)" -ne 0 ]; then
|
|
echo "Please run as root" >&2
|
|
exit 1
|
|
fi
|
|
|
|
build_dir="bin/linux"
|
|
out_dir="bin/package/linux"
|
|
script_dir=$( cd -- "$( dirname -- "${0}" )" &> /dev/null && pwd )
|
|
|
|
[[ -d "$script_dir/$build_dir" ]] || {
|
|
echo "[X] build folder wasn't found" >&2
|
|
exit 1
|
|
}
|
|
|
|
apt update || exit 1
|
|
apt install tar -y || exit 1
|
|
|
|
mkdir -p "$script_dir/$out_dir"
|
|
|
|
archive_file="$script_dir/$out_dir/generate_emu_config-linux.tar.gz"
|
|
[[ -f "$archive_file" ]] && rm -f "$archive_file"
|
|
|
|
pushd "$script_dir/$build_dir"
|
|
tar -c -j -vf "$archive_file" $(ls -d */)
|
|
popd
|