-
Notifications
You must be signed in to change notification settings - Fork 2
/
run.sh
executable file
·43 lines (33 loc) · 1.17 KB
/
run.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
39
40
41
42
#!/bin/bash
clear
echo "******************************START**********************************"
echo "******************************START**********************************"
#Path of the folder where corpus files are stored
#echo "Enter the path to the corpus "
CORPUSPATH="/home/admin-kitab/Documents/OpenITI/Github_clone"
#echo $CORPUSPATH
date
cd $CORPUSPATH
pwd
echo "Resetting local changes ..."
ls | xargs -P10 -I{} git -C {} reset --hard
echo "Fetching changes from corpus ..."
ls | xargs -P10 -I{} git -C {} pull origin
#Path of the folder where python script is located
#echo "Enter the path to the script "
ROOTPATH="/home/admin-kitab/Documents/Projects/kitab-metadata-automation"
#echo $ROOTPATH
cd $ROOTPATH
pwd
echo "Generating corpus metadata ..."
python3 generate-metadata.py -c ./utility/config-automated-do-not-remove-or-change.py
# echo "Committing changes to repo ..."
git config user.email [email protected]
git config user.name 'KITAB Project'
git add .
git commit -m 'output generated'
git pull
git push
date
echo "*****************************END***********************************"
echo "*****************************END***********************************"