-
Notifications
You must be signed in to change notification settings - Fork 1
/
run.sh
56 lines (52 loc) · 1.49 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
TIMESTAMP=`date '+%s'`
BRANCH1=import-$TIMESTAMP
BRANCH2=rebased-$TIMESTAMP
cd ../tosback2
git restore --staged .
rm -rf *
git checkout -- .
git checkout all-file-paths
git pull
# cat ../TOSBack-CGUs-bridge/crawl-files-list.txt | awk -F'/' '{print "mkdir -p \"" $1 "/" $2 "\"; touch \"" $0 "\"" }' | sh
ls -l crawl*/*/*.txt | wc -l
cd ../CGUs-snapshots
git checkout c02f4f9f18aa336d51d6bddaa893ee822e03ad7f
git branch $BRANCH1
git checkout $BRANCH1
cd ../CGUs-versions
git checkout 05d4c3e43bd28785bf491732cd5cd77eed050c36
git branch $BRANCH1
git checkout $BRANCH1
cd ../CGUs
git checkout master
git pull
git branch $BRANCH1
git checkout $BRANCH1
cd ../TOSBack-CGUs-bridge
node --unhandled-rejections=strict tosback-import.js
cd ../CGUs-snapshots
git push -u origin $BRANCH1
cd ../CGUs-versions
git push -u origin $BRANCH1
cd ../CGUs
git add services/
git commit -am"Services imported from tosback2 using https://github.com/ambanum/TOSBack-CGUs-bridge"
git push -u origin $BRANCH1
cd ../CGUs-snapshots
git checkout master
git pull
git branch $BRANCH2
git checkout $BRANCH2
git rebase --strategy-option=theirs $BRANCH1
git push -u origin $BRANCH2
cd ../CGUs-versions
git checkout master
git pull
git branch $BRANCH2
git checkout $BRANCH2
git rebase --strategy-option=theirs $BRANCH1
git push -u origin $BRANCH2