Code cleanup

This commit is contained in:
Eric Renfro 2024-08-03 14:33:30 -04:00
parent 694004ea08
commit 7b94bae02f
Signed by: psi-jack
SSH key fingerprint: SHA256:1TKB8Z257L8EHK8GWNxKgMhD8a+FAR+f+j3nnlcuNVM
2 changed files with 3 additions and 10 deletions

View file

@ -97,9 +97,9 @@ fi
archiveExt="${archiveFile##*.}"
if [[ "${archiveFile%%.$archiveExt}" != *.tar ]]; then
if [[ "${archiveFile%%."$archiveExt"}" != *.tar ]]; then
echo "The stage file you are trying to unpack (\`$archiveFile\`) does not appear to be an archived TAR file"
echo "${archiveFile%%.$archiveExt}"
echo "${archiveFile%%."$archiveExt"}"
exit 1
fi

View file

@ -152,18 +152,12 @@ if [[ -z "${compressAvail[$optCompressType]}" ]]; then
exit 1
fi
# Shifts pointer to read custom tar options
#shift
#mapfile -t OPTIONS <<< "$@"
# Handle when no options are passed
#((${#OPTIONS[@]} == 1)) && [ -z "${OPTIONS[0]}" ] && unset OPTIONS
# Check if using seperate kernel archive option
if $optSeperateKernel; then
optUserExclude+=("${targetPath}usr/src/*")
optUserExclude+=("${targetPath}lib*/modules/*")
fi
# tarExcludes:
tarExcludes=(
"dev/*"
@ -198,7 +192,6 @@ tarIncludes=(
"var/db/pkg/*"
)
#tarExcludes+=("${optUserExclude[@]}")
tarExcludes=("${tarExcludes[@]/#/"$targetPath"}")
tarIncludes=("${tarIncludes[@]/#/"$targetPath"}")