Created
August 9, 2018 08:58
-
-
Save weldpua2008/2cf2c14f49b102e4f569efdf44752d38 to your computer and use it in GitHub Desktop.
Get files from github to /etc/nginx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for u in '';do | |
| n=$(echo $u|cut -d '?' -f 1) | |
| while [ ${#n} -gt 0 ] && [[ $(echo $n| awk -F'/' '{print NF-1}') -gt 0 ]];do | |
| n=$(echo $n|sed 's/^[^/]*\///g'); | |
| if [[ -e "/etc/nginx/${n}" ]];then | |
| echo "curl ${u} > /etc/nginx/${n}" | |
| curl ${u} > /etc/nginx/${n} | |
| break | |
| fi | |
| done | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment