diff --git a/exstage4.sh b/exstage4.sh index 7f6a831..1f8fe14 100755 --- a/exstage4.sh +++ b/exstage4.sh @@ -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 diff --git a/mkstage4.sh b/mkstage4.sh index 02ba747..b6198a9 100755 --- a/mkstage4.sh +++ b/mkstage4.sh @@ -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"}")