mirror of
https://github.com/erenfro/gen2stage4.git
synced 2024-11-21 22:25:35 -05:00
Misc wordsplitting/globbing changes (#32)
-Add quotes to prevent word splitting -Remove $TARGET* globbing so hidden files are included -Remove unused globbing Signed-off-by: Lucian Poston <lucianposton@pm.me>
This commit is contained in:
parent
8ab90fa6b0
commit
afa8c072c9
2 changed files with 6 additions and 7 deletions
12
mkstage4.sh
12
mkstage4.sh
|
@ -215,12 +215,12 @@ then
|
|||
echo "example: \$ $(basename "$0") -s /my-backup --exclude=/etc/ssh/ssh_host*"
|
||||
echo
|
||||
echo "COMMAND LINE PREVIEW:"
|
||||
echo 'tar' "${TAR_OPTIONS[@]}" "${EXCLUDES[@]}" "${OPTIONS[@]}" -f "$STAGE4_FILENAME" ${TARGET}*
|
||||
echo 'tar' "${TAR_OPTIONS[@]}" "${EXCLUDES[@]}" "${OPTIONS[@]}" -f "$STAGE4_FILENAME" "${TARGET}"
|
||||
if ((S_KERNEL))
|
||||
then
|
||||
echo
|
||||
echo 'tar' "${TAR_OPTIONS[@]}" -f "$STAGE4_FILENAME.ksrc" "${TARGET}usr/src/linux-$(uname -r)"*
|
||||
echo 'tar' "${TAR_OPTIONS[@]}" -f "$STAGE4_FILENAME.kmod" "${TARGET}lib"*"/modules/$(uname -r)"*
|
||||
echo 'tar' "${TAR_OPTIONS[@]}" -f "$STAGE4_FILENAME.ksrc" "${TARGET}usr/src/linux-$(uname -r)"
|
||||
echo 'tar' "${TAR_OPTIONS[@]}" -f "$STAGE4_FILENAME.kmod" "${TARGET}lib"*"/modules/$(uname -r)"
|
||||
fi
|
||||
echo
|
||||
echo -n 'Type "yes" to continue or anything else to quit: '
|
||||
|
@ -230,10 +230,10 @@ fi
|
|||
# start stage4 creation:
|
||||
if [ "$AGREE" == 'yes' ]
|
||||
then
|
||||
tar "${TAR_OPTIONS[@]}" "${EXCLUDES[@]}" "${OPTIONS[@]}" -f "$STAGE4_FILENAME" ${TARGET}*
|
||||
tar "${TAR_OPTIONS[@]}" "${EXCLUDES[@]}" "${OPTIONS[@]}" -f "$STAGE4_FILENAME" "${TARGET}"
|
||||
if ((S_KERNEL))
|
||||
then
|
||||
tar "${TAR_OPTIONS[@]}" -f "$STAGE4_FILENAME.ksrc" "${TARGET}usr/src/linux-$(uname -r)"*
|
||||
tar "${TAR_OPTIONS[@]}" -f "$STAGE4_FILENAME.kmod" "${TARGET}lib"*"/modules/$(uname -r)"*
|
||||
tar "${TAR_OPTIONS[@]}" -f "$STAGE4_FILENAME.ksrc" "${TARGET}usr/src/linux-$(uname -r)"
|
||||
tar "${TAR_OPTIONS[@]}" -f "$STAGE4_FILENAME.kmod" "${TARGET}lib"*"/modules/$(uname -r)"
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -159,7 +159,6 @@ teardown() {
|
|||
}
|
||||
|
||||
@test "/.hiddenfile is included" {
|
||||
skip "TODO: Not yet implemented"
|
||||
assert_tar_includes test/.hiddenfile
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue