mirror of
https://github.com/guezoloic/serverconfig.git
synced 2026-01-25 01:34:22 +00:00
fix: install couldn't copy folders
This commit is contained in:
12
install.sh
12
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
|
||||
|
||||
Reference in New Issue
Block a user