mirror of
https://github.com/erenfro/gen2stage4.git
synced 2024-11-21 22:25:35 -05:00
Code cleanup
This commit is contained in:
parent
694004ea08
commit
7b94bae02f
2 changed files with 3 additions and 10 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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"}")
|
||||
|
||||
|
|
Loading…
Reference in a new issue