-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinstall.sh
More file actions
19 lines (15 loc) · 767 Bytes
/
install.sh
File metadata and controls
19 lines (15 loc) · 767 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
if [ "$(whoami)" != 'root' ]; then
echo "You have no permission to run $0 as non-root user."
exit 1;
fi
echo "#!/bin/bash" > "fetchAll.sh"
echo "python3.5 $(pwd)/fetchPackages.py cran -1 $(pwd)" >> "fetchAll.sh"
echo "python3.5 $(pwd)/fetchPackages.py rubygems -1 $(pwd)" >> "fetchAll.sh"
echo "python3.5 $(pwd)/fetchPackages.py npm -1 $(pwd)" >> "fetchAll.sh"
echo "python3.5 $(pwd)/fetchDependencies.py cran -1 $(pwd)" >> "fetchAll.sh"
echo "python3.5 $(pwd)/fetchDependencies.py rubygems -1 $(pwd)" >> "fetchAll.sh"
echo "python3.5 $(pwd)/fetchDependencies.py npm -1 $(pwd)" >> "fetchAll.sh"
chmod +x "fetchAll.sh"
echo "$(date -d "+5 minutes" +"%M %H %d %m") * $(pwd)/fetchAll.sh >> $(pwd)/log.log 2>&1" > "schedule.cron"
crontab "schedule.cron"