File tree Expand file tree Collapse file tree 3 files changed +47
-8
lines changed Expand file tree Collapse file tree 3 files changed +47
-8
lines changed Original file line number Diff line number Diff line change 33from sys import argv
44import os
55
6-
76domain = argv [1 ]
87all_domains = argv [2 ]
98toolpath = os .getcwd ()
1716
1817os .system ('./javascript_files_extractor.py ' + all_domains + ' ./temp/js_files.txt' )
1918os .system ('./javascript_files_link_extractor.sh ./temp/js_files.txt ./results/' + domain + '/urls.txt ./dependency/relative-url-extractor/extract.rb' )
20-
21- if not first_time :
22- os .system ('./sendmail.sh' )
23-
24-
19+ os .system ('./sendmail.sh ' + domain )
2520os .system ('git add . && git commit -m \" ' + datetime .datetime .now ().strftime ("%I:%M%p on %B %d, %Y" )+ domain + '\" ' )
Original file line number Diff line number Diff line change 1+ diff --git a/diffJs.py b/diffJs.py
2+ index 2eaf371..04a50c7 100755
3+ --- a/diffJs.py
4+ +++ b/diffJs.py
5+ @@ -3,7 +3,6 @@ import datetime
6+ from sys import argv
7+ import os
8+
9+ -
10+ domain=argv[1]
11+ all_domains=argv[2]
12+ toolpath=os.getcwd()
13+ @@ -17,9 +16,5 @@ if not first_time :
14+
15+ os.system('./javascript_files_extractor.py '+all_domains+' ./temp/js_files.txt')
16+ os.system('./javascript_files_link_extractor.sh ./temp/js_files.txt ./results/'+domain+'/urls.txt ./dependency/relative-url-extractor/extract.rb')
17+ -
18+ -if not first_time:
19+ - os.system('./sendmail.sh')
20+ -
21+ -
22+ +os.system('./sendmail.sh '+domain)
23+ os.system('git add . && git commit -m \"'+datetime.datetime.now().strftime("%I:%M%p on %B %d, %Y")+domain+'\"')
24+ \ No newline at end of file
25+ diff --git a/sendmail.sh b/sendmail.sh
26+ index d4c246b..e9a9098 100755
27+ --- a/sendmail.sh
28+ +++ b/sendmail.sh
29+ @@ -1,5 +1,8 @@
30+ if [[ $(git diff HEAD) ]]; then
31+ - echo 'dirty'
32+ + git diff HEAD > ./results/$1/changes.txt
33+ + date >> ./results/$1/changes.txt
34+ + curl -d '{"changed":"'$1'"}' -H "Content-Type: application/json" -X POST https://hooks.zapier.com/hooks/catch/3086942/katsqw/
35+ + echo 'Mail Sent for changes in $1 on $(date)'
36+ else
37+ - echo 'clean'
38+ + echo 'No changes found'
39+ fi
40+ \ No newline at end of file
41+ Thu Mar 22 08:12:18 IST 2018
Original file line number Diff line number Diff line change 11if [[ $( git diff HEAD) ]]; then
2- echo ' dirty'
2+ git diff HEAD > ./results/$1 /changes.txt
3+ date >> ./results/$1 /changes.txt
4+ curl -d ' {"changed":"' $1 ' "}' -H " Content-Type: application/json" -X POST https://hooks.zapier.com/hooks/catch/3086942/katsqw/
5+ echo ' Mail Sent for changes in $1 on $(date)'
36else
4- echo ' clean '
7+ echo ' No changes found '
58fi
You can’t perform that action at this time.
0 commit comments