We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0dd4d93 commit 7f16cecCopy full SHA for 7f16cec
scripts/copy-documentation-for-new-release.sh
@@ -2,6 +2,9 @@
2
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
3
cd "$SCRIPT_DIR/.."
4
5
+#exit on error
6
+set -e
7
+
8
if [[ $# != 1 ]]; then
9
echo "Usage: $0 <commitish>"
10
exit 1
@@ -17,14 +20,12 @@ function copy_source_to(){
17
20
local FILE_PATH="${DIR}.md"
18
21
19
22
if [ -e "$DIR" ]; then
- echo "$DIR already exists, cannot continue"
- exit 1
23
+ echo "$DIR already exists, removing it for update"
24
+ rm -r "$DIR"
25
fi
26
- if [ -e "$FILE_PATH" ]
- then
- echo "$FILE_PATH already exists, cannot continue"
27
+ if [ -e "$FILE_PATH" ]; then
28
+ rm -r "$FILE_PATH"
29
30
31
echo "Copy $SOURCE_PATH to $DIR"
0 commit comments