2023-12-17 01:58:52 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
|
2023-12-26 01:22:50 +02:00
|
|
|
build_base_dir="build/linux"
|
2023-12-27 21:45:55 +02:00
|
|
|
out_dir="build/package/linux"
|
2023-12-24 23:03:11 +02:00
|
|
|
script_dir=$( cd -- "$( dirname -- "${0}" )" &> /dev/null && pwd )
|
2023-12-17 01:58:52 +02:00
|
|
|
|
|
|
|
[[ "$1" = '' ]] && {
|
|
|
|
echo "[X] missing build folder";
|
|
|
|
exit 1;
|
|
|
|
}
|
|
|
|
|
2024-06-02 20:11:18 +03:00
|
|
|
target_src_dir="$script_dir/$build_base_dir/$1"
|
|
|
|
[[ -d "$target_src_dir" ]] || {
|
2023-12-17 01:58:52 +02:00
|
|
|
echo "[X] build folder wasn't found";
|
|
|
|
exit 1;
|
|
|
|
}
|
|
|
|
|
2024-03-03 03:52:50 +02:00
|
|
|
archive_file="$script_dir/$out_dir/$1/emu-linux-$1.tar.bz2"
|
2023-12-17 01:58:52 +02:00
|
|
|
[[ -f "$archive_file" ]] && rm -f "$archive_file"
|
2024-06-02 20:11:18 +03:00
|
|
|
mkdir -p "$(dirname "$archive_file")"
|
|
|
|
tar -C "$(dirname "$target_src_dir")" -c -j -vf "$archive_file" "$(basename "$target_src_dir")"
|