mirror of
https://github.com/guezoloic/serverconfig.git
synced 2026-01-25 07:34:23 +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")
|
filename=$(basename "$config")
|
||||||
info_print "Moving $filename to $SCRIPT_FILE"
|
info_print "Moving $filename to $SCRIPT_FILE"
|
||||||
|
|
||||||
install $argument "$config" "$ETC_DIR/$filename" -Dm755 \
|
if [ -d "$config" ]; then
|
||||||
&& { info_print "$ETC_DIR/$filename installed." 6; } \
|
cp -r "$config" "$ETC_DIR/" \
|
||||||
|| { info_print "$ETC_DIR/$filename failed." 3; ISERROR=true; }
|
&& { 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
|
done
|
||||||
|
|
||||||
if $ISERROR; then
|
if $ISERROR; then
|
||||||
|
|||||||
Reference in New Issue
Block a user