Skip to content

Commit bab8465

Browse files
committed
added sources download script
1 parent aa1fb73 commit bab8465

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

downloadSources.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash -
2+
3+
# strict error handling
4+
set -o pipefail # trace ERR through pipes
5+
set -o errtrace # trace ERR through 'time command' and other functions
6+
set -o nounset # set -u : exit the script if you try to use an uninitialized variable
7+
set -o errexit # set -e : exit the script if any statement returns a non-true return value
8+
9+
echo "$(date +'%0Y-%0m-%0d %0R:%0S'): Welcome to the sources download script."
10+
11+
curDir="$(pwd)"
12+
echo "$(date +'%0Y-%0m-%0d %0R:%0S'): The current directory is '$curDir'."
13+
14+
scriptDir="$(realpath "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/bookbase/scripts")"
15+
echo "$(date +'%0Y-%0m-%0d %0R:%0S'): The script directory is '$scriptDir'."
16+
17+
gitDownload="$(realpath "$scriptDir/gitDownload.sh")"
18+
echo "$(date +'%0Y-%0m-%0d %0R:%0S'): The git download script is 'gitDownload'."
19+
20+
downloadDir="programmingWithPython_sources_$(date +"%Y%m%d")"
21+
echo "$(date +'%0Y-%0m-%0d %0R:%0S'): We will use the download directory '$downloadDir'."
22+
mkdir -p "$downloadDir"
23+
cd "$downloadDir"
24+
25+
"$gitDownload" "programmingWithPython"
26+
"$gitDownload" "programmingWithPythonQuestions"
27+
"$gitDownload" "programmingWithPythonSlidesDE"
28+
"$gitDownload" "programmingWithPythonSlidesDE2"
29+
"$gitDownload" "programmingWithPythonCode"
30+
31+
"$scriptDir/downloadStandardSources.sh"
32+
33+
echo "$(date +'%0Y-%0m-%0d %0R:%0S'): Done with the sources download script."

0 commit comments

Comments
 (0)