mirror of
https://github.com/pivpn/pivpn.git
synced 2025-04-24 08:10:10 +00:00
parent
d691321b3e
commit
b8f89ab015
21 changed files with 507 additions and 692 deletions
|
@ -15,17 +15,6 @@ fi
|
|||
|
||||
source "${setupVars}"
|
||||
|
||||
scriptusage(){
|
||||
echo "::: Updates PiVPN scripts"
|
||||
echo ":::"
|
||||
echo "::: Usage: pivpn <-up|update> [-t|--test]"
|
||||
echo ":::"
|
||||
echo "::: Commands:"
|
||||
echo "::: [none] Updates from master branch"
|
||||
echo "::: -t, test Updates from test branch"
|
||||
echo "::: -h, help Show this usage dialog"
|
||||
}
|
||||
|
||||
###Functions
|
||||
##Updates scripts
|
||||
updatepivpnscripts(){
|
||||
|
@ -79,6 +68,14 @@ cloneupdttest(){
|
|||
git -C "$pivpnlocalpath" checkout master
|
||||
}
|
||||
|
||||
scriptusage(){
|
||||
echo -e "Updates pivpn scripts,
|
||||
|
||||
Usage:
|
||||
pivpn update | updates from master branch
|
||||
pivpn update -t or --test | updates from test branch"
|
||||
}
|
||||
|
||||
## SCRIPT
|
||||
|
||||
if [[ $# -eq 0 ]]; then
|
||||
|
@ -86,15 +83,15 @@ if [[ $# -eq 0 ]]; then
|
|||
else
|
||||
while true; do
|
||||
case "$1" in
|
||||
-t|test)
|
||||
-t|--test|test)
|
||||
updatefromtest
|
||||
exit 0
|
||||
;;
|
||||
-h|help)
|
||||
-h|--help|help)
|
||||
scriptusage
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
* )
|
||||
updatepivpnscripts
|
||||
exit 0
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue