File tree 1 file changed +26
-1
lines changed 1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ while true ; do
4
+ read -p " Did you submit all other changes and are you ready to update the pages? " yn
5
+ case $yn in
6
+ [Yy]* )
7
+
8
+
9
+
10
+ TIMESTAMP=` date +' %Y-%m-%d %H:%M:%S' `
11
+
12
+ # Reset the counts of all notebook cells
13
+ for h in ` find -name " *.ipynb" `
14
+ do
15
+ sed -i ' s/^.*\execution_count\b.*$/ "execution_count": null,/' $h
16
+ done
17
+ git add *
18
+ git commit -m " reset counts of all notebook cells - ${TIMESTAMP} "
19
+ git push
20
+
3
21
# Create a temporary folder
4
22
TMP_DIR=` mktemp -d`
5
23
46
64
done
47
65
48
66
# Submit changes with current timestamp
49
- TIMESTAMP=` date +' %Y-%m-%d %H:%M:%S' `
50
67
git add *
51
68
git commit -a -m " Update gh-pages - ${TIMESTAMP} "
52
69
git push origin gh-pages
@@ -56,3 +73,11 @@ rm -rf "$TMP_DIR"
56
73
57
74
# Go back to the master branch
58
75
git checkout master
76
+
77
+
78
+
79
+ break ;;
80
+ [Nn]* ) exit ;;
81
+ * ) echo " Please answer yes or no." ;;
82
+ esac
83
+ done
You can’t perform that action at this time.
0 commit comments