u
This commit is contained in:
parent
746970f1ff
commit
a8d4e82d0b
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "in [RepoRoot]/*/*/hooks/post-receive & pre-receive, gogs is hard-coded with full path such as /faronear/git/gogs, you need to replace it if the path is changed."
|
||||
echo "in [RepoRoot]/*/*/hooks/[pre|update|post]-receive.d/*, path is hard-coded in full such as `/faronear/git/gitea/custom/conf/app.ini`, you need to replace it if the path is changed."
|
||||
read -p "Enter old hook path: >> " OLDPATH
|
||||
read -p "Enter new hook path: >> " NEWPATH
|
||||
read -p "Enter repository root path: >> " REPOROOT
|
@ -13,3 +13,6 @@ get_char()
|
||||
|
||||
echo "Press any key to exit!"
|
||||
char=`get_char`
|
||||
|
||||
# read -p "press Enter to exit!"
|
||||
# echo "Bye!"
|
22
proxy.sh
Executable file
22
proxy.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
function proxy(){
|
||||
echo "=== 开启或关闭网络代理? u for up, d for down, anything else for no change."
|
||||
read -p ">>> " proxySwitch
|
||||
if [ $proxySwitch ] && [ $proxySwitch == "u" ]
|
||||
then
|
||||
export ALL_PROXY=socks5://127.0.0.1:1090
|
||||
export http_proxy=http://127.0.0.1:41091
|
||||
export https_proxy=https://127.0.0.1:41091
|
||||
echo -e "--- 已开启网络代理"
|
||||
elif [ $proxySwitch ] && [ $proxySwitch == "d" ]
|
||||
then
|
||||
unset ALL_PROXY
|
||||
unset http_proxy
|
||||
unset https_proxy
|
||||
echo -e "--- 已关闭网络代理"
|
||||
else
|
||||
echo "--- Nothing changed."
|
||||
fi
|
||||
}
|
||||
proxy
|
Loading…
Reference in New Issue
Block a user