Enabled code to actually run and be testable

This commit is contained in:
Eric Renfro 2024-08-03 16:00:08 -04:00
parent e309ffafc0
commit 02d34478d8
Signed by: psi-jack
SSH key fingerprint: SHA256:1TKB8Z257L8EHK8GWNxKgMhD8a+FAR+f+j3nnlcuNVM
3 changed files with 23 additions and 23 deletions

View file

@ -82,10 +82,10 @@ done
# checks if run as root:
#if [[ "$(id -u)" -ne 0 ]]; then
# echo "$(basename "$0"): must run as root"
# exit 250
#fi
if [[ "$(id -u)" -ne 0 ]]; then
echo "$(basename "$0"): must run as root"
exit 250
fi
if [[ -z "$sourcePath" ]]; then
echo "$(basename "$0"): no source path specified"
@ -213,6 +213,6 @@ fi
# start stage4 creation:
if $optQuiet; then
echo "Would've worked"
#rsync "${rsyncOptions[@]}" "${syncExcludes[@]/#/--exclude=}" "$sourcePath" "$targetPath"
#echo "Would've worked"
rsync "${rsyncOptions[@]}" "${syncExcludes[@]/#/--exclude=}" "$sourcePath" "$targetPath"
fi

View file

@ -85,10 +85,10 @@ while [[ $# -gt 0 ]]; do
done
# checks if run as root:
#if [[ "$(id -u)" -ne 0 ]]; then
# echo "$(basename "$0"): must run as root"
# exit 250
#fi
if [[ "$(id -u)" -ne 0 ]]; then
echo "$(basename "$0"): must run as root"
exit 250
fi
if [[ ! -r "$archiveFile" ]]; then
echo "ERROR: archive file (\`$archiveFile\`) does not exist"
@ -158,6 +158,6 @@ fi
# start stage4 creation:
if $optQuiet; then
echo "Would've worked"
#tar "${tarOptions[@]}" -f "$archiveFile" -C "$targetPath"
#echo "Would've worked"
tar "${tarOptions[@]}" -f "$archiveFile" -C "$targetPath"
fi

View file

@ -112,10 +112,10 @@ done
# checks if run as root:
#if [[ "$(id -u)" -ne 0 ]]; then
# echo "$(basename "$0"): must run as root"
# exit 250
#fi
if [[ "$(id -u)" -ne 0 ]]; then
echo "$(basename "$0"): must run as root"
exit 250
fi
if [[ -z "$targetPath" ]]; then
echo "$(basename "$0"): no system path specified"
@ -287,11 +287,11 @@ fi
# start stage4 creation:
if $optQuiet; then
echo "Would've worked"
#tar "${tarOptions[@]}" "${tarIncludes[@]/#/--include=}" "${tarExcludes[@]/#/--exclude=}" -f "${stage4Filename}.${stage4Ext}" "${targetPath}"
#if [[ "$optSeperateKernel" ]]
#then
# tar "${tarOptions[@]}" -f "${stage4Filename}.ksrc.${stage4Ext}" "${targetPath}usr/src/linux-$(uname -r)"
# tar "${tarOptions[@]}" -f "${stage4Filename}.kmod.${stage4Ext}" "${targetPath}lib"*"/modules/$(uname -r)"
#fi
#echo "Would've worked"
tar "${tarOptions[@]}" "${tarIncludes[@]/#/--include=}" "${tarExcludes[@]/#/--exclude=}" -f "${stage4Filename}.${stage4Ext}" "${targetPath}"
if [[ "$optSeperateKernel" ]]
then
tar "${tarOptions[@]}" -f "${stage4Filename}.ksrc.${stage4Ext}" "${targetPath}usr/src/linux-$(uname -r)"
tar "${tarOptions[@]}" -f "${stage4Filename}.kmod.${stage4Ext}" "${targetPath}lib"*"/modules/$(uname -r)"
fi
fi