mirror of
https://github.com/MustardChef/WSABuilds.git
synced 2024-11-23 11:49:16 +01:00
Minor Changes
This commit is contained in:
parent
ff4ca1921d
commit
8367bf2b60
@ -865,19 +865,20 @@ if [ "$COMPRESS_OUTPUT" ] || [ -n "$COMPRESS_FORMAT" ]; then
|
||||
if [ "$FILE_EXT" = ".xz" ]; then
|
||||
FILE_EXT=".tar$FILE_EXT"
|
||||
fi
|
||||
OUTPUT_PATH="$OUTPUT_PATH$FILE_EXT"
|
||||
fi
|
||||
rm -f "${OUTPUT_PATH:?}$FILE_EXT" || abort
|
||||
rm -f "${OUTPUT_PATH:?}" || abort
|
||||
if [ "$COMPRESS_FORMAT" = "7z" ]; then
|
||||
echo "Compressing with 7z"
|
||||
7z a "${OUTPUT_PATH:?}$FILE_EXT" "$WORK_DIR/wsa/$artifact_name" || abort
|
||||
7z a "${OUTPUT_PATH:?}" "$WORK_DIR/wsa/$artifact_name" || abort
|
||||
elif [ "$COMPRESS_FORMAT" = "xz" ]; then
|
||||
echo "Compressing with tar xz"
|
||||
if ! (tar -cP -I 'xz -9 -T0' -f "${OUTPUT_PATH:?}$FILE_EXT" "$WORK_DIR/wsa/$artifact_name"); then
|
||||
if ! (tar -cP -I 'xz -9 -T0' -f "${OUTPUT_PATH:?}" "$WORK_DIR/wsa/$artifact_name"); then
|
||||
echo "Out of memory? Trying again with single threads..."
|
||||
tar -cPJvf "${OUTPUT_PATH:?}$FILE_EXT" "$WORK_DIR/wsa/$artifact_name" || abort
|
||||
tar -cPJvf "${OUTPUT_PATH:?}" "$WORK_DIR/wsa/$artifact_name" || abort
|
||||
fi
|
||||
elif [ "$COMPRESS_FORMAT" = "zip" ]; then
|
||||
7z -tzip a "${OUTPUT_PATH:?}$FILE_EXT" "$WORK_DIR/wsa/$artifact_name" || abort
|
||||
7z -tzip a "${OUTPUT_PATH:?}" "$WORK_DIR/wsa/$artifact_name" || abort
|
||||
fi
|
||||
else
|
||||
rm -rf "${OUTPUT_PATH:?}" || abort
|
||||
|
@ -53,6 +53,7 @@ check_dependencies() {
|
||||
command -v 7z > /dev/null 2>&1 || NEED_INSTALL+=("p7zip-full")
|
||||
command -v setfattr > /dev/null 2>&1 || NEED_INSTALL+=("attr")
|
||||
command -v xz > /dev/null 2>&1 || NEED_INSTALL+=("xz-utils")
|
||||
command -v unzip > /dev/null 2>&1 || NEED_INSTALL+=("unzip")
|
||||
}
|
||||
check_dependencies
|
||||
osrel=$(sed -n '/^ID_LIKE=/s/^.*=//p' /etc/os-release);
|
||||
|
Loading…
Reference in New Issue
Block a user