aboutsummaryrefslogtreecommitdiff
path: root/challenge-203/spadacciniweb/bash
diff options
context:
space:
mode:
author冯昶 <fengchang@novel-supertv.com>2023-02-13 15:26:44 +0800
committer冯昶 <fengchang@novel-supertv.com>2023-02-13 15:26:44 +0800
commit1d7da338f23a3842739e903bfd4e06a04f341c11 (patch)
tree1b896c54af3cc17ab0db3c1ce1c181fbd57c1ad2 /challenge-203/spadacciniweb/bash
parent9d964b9bb2fc6df2fcaa6018fa6369f582996dab (diff)
parent5ccac734c46826df9dedf843701fb1514175c2a6 (diff)
downloadperlweeklychallenge-club-1d7da338f23a3842739e903bfd4e06a04f341c11.tar.gz
perlweeklychallenge-club-1d7da338f23a3842739e903bfd4e06a04f341c11.tar.bz2
perlweeklychallenge-club-1d7da338f23a3842739e903bfd4e06a04f341c11.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'challenge-203/spadacciniweb/bash')
-rw-r--r--challenge-203/spadacciniweb/bash/ch-2.bash12
1 files changed, 12 insertions, 0 deletions
diff --git a/challenge-203/spadacciniweb/bash/ch-2.bash b/challenge-203/spadacciniweb/bash/ch-2.bash
new file mode 100644
index 0000000000..022c932d20
--- /dev/null
+++ b/challenge-203/spadacciniweb/bash/ch-2.bash
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+echo -n "path source: "
+read SOURCE
+
+[ -d "$SOURCE" ] || { echo "$SOURCE directory does not exist."; exit 1; }
+
+echo -n "path target: "
+read TARGET
+[ -d "$TARGET" ] || { echo "$TARGET directory does not exist."; exit 1; }
+
+rsync -av -f"+ */" -f"- *" $SOURCE/ $TARGET