🗃️ Committing everything that changed 🗃️
Some checks failed
release-tag / release-image (push) Failing after 7m3s

rootfs/usr/local/bin/copy
rootfs/usr/local/bin/symlink
This commit is contained in:
casjay 2024-09-04 08:53:18 -04:00
parent 412f8c9456
commit 04b8270f8e
Signed by untrusted user who does not match committer: jason
GPG Key ID: 1AB309F42A764145
2 changed files with 4 additions and 2 deletions

View File

@ -55,7 +55,8 @@ COPY_EXIT_STATUS=0
# Main application # Main application
{ [ $# -eq 2 ] || [ "$1" = "--help" ]; } || { __printf_color "Usage: $APPNAME fromFile toFile" && exit 1; } { [ $# -eq 2 ] || [ "$1" = "--help" ]; } || { __printf_color "Usage: $APPNAME fromFile toFile" && exit 1; }
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if [ "$1" != "$2" ]; then is_link="$(ls -la "$2" 2>/dev/null | awk '{print $NF}')"
if [ "$1" != "$is_link" ]; then
if [ -d "$1" ]; then if [ -d "$1" ]; then
mkdir -p "$2" mkdir -p "$2"
cp -Rf "$1/." "$2/" cp -Rf "$1/." "$2/"

View File

@ -55,7 +55,8 @@ SYMLINK_EXIT_STATUS=0
# Main application # Main application
{ [ $# -eq 2 ] || [ "$1" = "--help" ]; } || { __printf_color "Usage: $APPNAME fromFile toFile" && exit 1; } { [ $# -eq 2 ] || [ "$1" = "--help" ]; } || { __printf_color "Usage: $APPNAME fromFile toFile" && exit 1; }
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if [ "$1" != "$2" ]; then is_link="$(ls -la "$2" 2>/dev/null | awk '{print $NF}')"
if [ "$1" != "$is_link" ]; then
if [ -L "$2" ]; then if [ -L "$2" ]; then
unlink "$2" unlink "$2"
elif [ -e "$2" ]; then elif [ -e "$2" ]; then