-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathnems-push.sh
More file actions
executable file
·78 lines (69 loc) · 1.68 KB
/
nems-push.sh
File metadata and controls
executable file
·78 lines (69 loc) · 1.68 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
DATE=`date +%Y-%m-%d`
if [[ "$1" == '' ]]; then comment="Update $DATE"; else comment=$1; fi
echo Pushing NEMS update: $comment
echo ""
read -s -p "Github Password: " password
ram=$(grep MemTotal /proc/meminfo | awk '{print $2 * 1024/2}')
ram=$(( ${ram}*90/100 ))
ramMB=$(( ${ram}/1024/1024 ))
echo ""
echo ""
echo "Setting postBuffer to $ram bytes ($ramMB MB)."
echo ""
git config --global http.postBuffer $ram
cd /root/nems/nems-admin
echo ""
pwd
git pull
git add *
git commit -am "$comment"
#git push origin master
git config https.postBuffer $ram
git push "https://Cat5TV:$password@github.com/Cat5TV/nems-admin.git"
cd /usr/local/share/nems/nems-scripts/
echo ""
pwd
git pull
git add *
git commit -am "$comment"
#git push origin master
git config https.postBuffer $ram
git push "https://Cat5TV:$password@github.com/Cat5TV/nems-scripts.git"
cd /var/www/nems-tv/
echo ""
pwd
git pull
git add *
git commit -am "$comment"
git config https.postBuffer $ram
git push "https://Cat5TV:$password@github.com/Cat5TV/nems-tv.git"
cd /root/nems/nems-migrator/
echo ""
pwd
git pull
git add *
git commit -am "$comment"
#git push origin master
git config https.postBuffer $ram
git push "https://Cat5TV:$password@github.com/Cat5TV/nems-migrator.git"
cd /var/www/nconf/
echo ""
pwd
git pull
git add *
git commit -am "$comment"
#git push origin develop
git config https.postBuffer $ram
git push "https://Cat5TV:$password@github.com/Cat5TV/nconf.git"
if [[ -d /root/nems/nems-tools ]]; then
cd /root/nems/nems-tools
echo ""
pwd
git pull
git add *
git commit -am "$comment"
#git push origin master
git config https.postBuffer $ram
git push "https://Cat5TV:$password@github.com/Cat5TV/nems-tools.git"
fi