-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathupdate-code.sh
More file actions
executable file
·60 lines (52 loc) · 2.34 KB
/
Copy pathupdate-code.sh
File metadata and controls
executable file
·60 lines (52 loc) · 2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
echo "Updating code repository..."
cd ../the-map-group.github.io
./update-repo.sh
COMMIT_MESSAGE=`git log -1 --pretty=%B`
echo "Copying data from code repository..."
cd ../The-Map-Group
git checkout -- .
cp ../the-map-group.github.io/countries_bbox.js .
cp ../the-map-group.github.io/countries_info.py .
cp ../the-map-group.github.io/matrix.py .
cp ../the-map-group.github.io/config.py .
cp ../the-map-group.github.io/reset.py .
cp ../the-map-group.github.io/custom.js .
cp ../the-map-group.github.io/generate-map-data.py .
cp ../the-map-group.github.io/index.html .
cp ../the-map-group.github.io/style.css .
cp ../the-map-group.github.io/update-maps.py .
cp ../the-map-group.github.io/countries/custom.js countries/
cp ../the-map-group.github.io/countries/index.html countries/
cp ../the-map-group.github.io/countries/style.css countries/
cp ../the-map-group.github.io/countries/updateHtmlFiles.pl countries/
cp ../the-map-group.github.io/countries/update-html.sh countries/
cp ../the-map-group.github.io/people/config.js people/
cp ../the-map-group.github.io/people/custom.js people/
cp ../the-map-group.github.io/people/index.html people/
cp ../the-map-group.github.io/people/photos.html people/
cp ../the-map-group.github.io/people/removeMembers.pl people/
cp ../the-map-group.github.io/people/reset-member-map.sh people/
cp ../the-map-group.github.io/people/resetMembers.pl people/
cp ../the-map-group.github.io/people/setup-member.sh people/
cp ../the-map-group.github.io/people/restartMembers.pl people/
cp ../the-map-group.github.io/people/restart-member.sh people/
cp ../the-map-group.github.io/people/style.css people/
cp ../the-map-group.github.io/people/update-countries-map-data.py people/
cp ../the-map-group.github.io/people/updateHtmlFiles.pl people/
cp ../the-map-group.github.io/people/update-html.sh people/
cp ../the-map-group.github.io/people/update-member-map.sh people/
git status
echo "Changes: \"$COMMIT_MESSAGE\""
read -p "Commit and push the changes? (Yes/No): " confirm && [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]] || exit 1
read -p "Edit commit message? (Yes/No): " confirm
if [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]];
then
read -p "New message: " COMMIT_MESSAGE
fi
echo "Commiting changes..."
git add *
git commit -m "Updated code [$COMMIT_MESSAGE]"
echo "Pushing changes..."
git push origin main
git push fork main