-
Notifications
You must be signed in to change notification settings - Fork 2
/
backup.sh
executable file
·38 lines (33 loc) · 1.09 KB
/
backup.sh
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
#!/usr/bin/env bash
#
# This file is part of orgsec community backup, a backup of orgsec.community.
# Copyright © 2016 seamus tuohy, <[email protected]>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the included LICENSE file for details.
set -e
set -u
set -x
# Read Only variables
readonly PROG_DIR=$(readlink -m $(dirname $0))
#readonly readonly PROGNAME=$(basename )
#readonly PROGDIR=$(readlink -m $(dirname ))
main() {
# Get the current version of the scripts
git checkout gh-pages
git checkout master update.py
date
python3 update.py
git add .
CUR_DATE=$(date)
git commit -m "Updated orgsec to reflect latest as of $CUR_DATE"
git push
git checkout master
}
main