Add wo_version variable for installation
This commit is contained in:
11
install
11
install
@@ -80,6 +80,10 @@ while [ "$#" -gt 0 ]; do
|
|||||||
-w | --wufw | --without-ufw)
|
-w | --wufw | --without-ufw)
|
||||||
ufw="n"
|
ufw="n"
|
||||||
;;
|
;;
|
||||||
|
-v | --version)
|
||||||
|
wo_version="$2"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
*) # positional args
|
*) # positional args
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -438,8 +442,13 @@ wo_install() {
|
|||||||
{
|
{
|
||||||
rm -f /etc/bash_completion.d/wo_auto.rc
|
rm -f /etc/bash_completion.d/wo_auto.rc
|
||||||
rm -rf /var/lib/wo/tmp/WordOps-*
|
rm -rf /var/lib/wo/tmp/WordOps-*
|
||||||
|
if [ -z "$wo_version" ]; then
|
||||||
curl -sL https://github.com/WordOps/WordOps/archive/${wo_branch}.tar.gz | tar -I pigz -xf - -C /var/lib/wo/tmp
|
curl -sL https://github.com/WordOps/WordOps/archive/${wo_branch}.tar.gz | tar -I pigz -xf - -C /var/lib/wo/tmp
|
||||||
cd /var/lib/wo/tmp/WordOps-${wo_branch} || exit 1
|
cd "/var/lib/wo/tmp/WordOps-$wo_branch" || exit 1
|
||||||
|
else
|
||||||
|
curl -sL https://github.com/WordOps/WordOps/archive/v${wo_version}.tar.gz | tar -I pigz -xf - -C /var/lib/wo/tmp
|
||||||
|
cd "/var/lib/wo/tmp/WordOps-$wo_version" || exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
} \
|
} \
|
||||||
>> "$wo_install_log" 2>&1
|
>> "$wo_install_log" 2>&1
|
||||||
|
|||||||
Reference in New Issue
Block a user