From 35ce96ddc7b32fab30c07df03693ba938d9f778a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20GUEZO?= Date: Tue, 26 Aug 2025 14:47:36 +0200 Subject: [PATCH] fix: install couldn't copy folders --- install.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 63aa78e..99aaf0e 100644 --- a/install.sh +++ b/install.sh @@ -43,9 +43,15 @@ for config in config/*; do filename=$(basename "$config") info_print "Moving $filename to $SCRIPT_FILE" - install $argument "$config" "$ETC_DIR/$filename" -Dm755 \ - && { info_print "$ETC_DIR/$filename installed." 6; } \ - || { info_print "$ETC_DIR/$filename failed." 3; ISERROR=true; } + if [ -d "$config" ]; then + cp -r "$config" "$ETC_DIR/" \ + && { info_print "$ETC_DIR/$filename installed (directory)." 6; } \ + || { info_print "$ETC_DIR/$filename failed (directory)." 3; ISERROR=true; } + else + install -Dm755 "$config" "$ETC_DIR/$filename" \ + && { info_print "$ETC_DIR/$filename installed." 6; } \ + || { info_print "$ETC_DIR/$filename failed." 3; ISERROR=true; } + fi done if $ISERROR; then