logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>
commit: 57f15d3515dce8a69e7758ec32f12b65e7709f73
parent 15cb1064ee9cc54f880586fb814752c459a5c897
Author: fosslinux <fosslinux@aussies.space>
Date:   Sun, 12 Jan 2025 13:41:11 +1100

Handle files correctly that start with a dash

Currently these were interpreted as options

Diffstat:

Msteps/helpers.sh10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/steps/helpers.sh b/steps/helpers.sh @@ -31,8 +31,8 @@ _get_files() { for f in ${fs}; do # Archive symlinks to directories as symlinks echo "${prefix}/${f}" - if [ -d "${f}" ] && ! [ -h "${f}" ]; then - cd "${f}" + if [ -d "./${f}" ] && ! [ -h "./${f}" ]; then + cd "./${f}" _get_files "${prefix}/${f}" cd .. fi @@ -54,9 +54,9 @@ reset_timestamp() { fs="${fs} $(echo .[0-z]*)" fi for f in ${fs}; do - touch -h -t 197001010000.00 "${f}" - if [ -d "${f}" ]; then - cd "${f}" + touch -h -t 197001010000.00 "./${f}" + if [ -d "./${f}" ]; then + cd "./${f}" reset_timestamp cd .. fi