Fixed the tar command

master
WolverinDEV 2021-03-22 19:13:04 +01:00
parent 5a2b5143a0
commit f7c1f828c5
1 changed files with 3 additions and 1 deletions

View File

@ -29,14 +29,16 @@ unzip "$package_file" -d "$temp_dir/raw/"
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
rm -r "$temp_dir" &>/dev/null rm -r "$temp_dir" &>/dev/null
echo "Failed to unpack package." echo "Failed to unpack package."
exit 1
fi fi
echo "Generating .tar.gz file from $package_file" echo "Generating .tar.gz file from $package_file"
package_file="$temp_dir/$(basename -s ".zip" "$package_file").tar.gz" package_file="$temp_dir/$(basename -s ".zip" "$package_file").tar.gz"
tar chvzf "$package_file" "$temp_dir"/raw/*; tar --use-compress-program="gzip -9" -C "$temp_dir/raw/" -c . -cf "$package_file";
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
rm -r "$temp_dir" rm -r "$temp_dir"
echo "Failed to package package." echo "Failed to package package."
exit 1
fi fi
git_hash=$(git_version "short-tag") git_hash=$(git_version "short-tag")