This commit is contained in:
hl committed 2024-11-19 14:13:06 +08:00
1 parent 53df72f761
commit c786fd8d5a
3 files changed
+33 -10

No files matched your search

+3 -3
View File
@@ -47,11 +47,11 @@ usage(){
echo " -s skip setup"; echo " -s skip setup";
} }
NO_SETUP=false; DO_SETUP=true;
while getopts ":i" OPT; do while getopts ":i" OPT; do
case $OPT in case $OPT in
s) s)
NO_SETUP=true; DO_SETUP=false;
;; ;;
?) ?)
echo "Invalid Option: -$OPTARG"; echo "Invalid Option: -$OPTARG";
@@ -61,6 +61,6 @@ while getopts ":i" OPT; do
done; done;
main main
if ! $NO_SETUP; then if $DO_SETUP; then
setup setup
fi; fi;
+21 -2
View File
@@ -44,10 +44,29 @@ APT::Install-Suggests "0";" | tee /etc/apt/apt.conf.d/01norecommend >/dev/null
if [ $DISTRO_PVE -eq 1 ]; then if [ $DISTRO_PVE -eq 1 ]; then
sed -i -E "s/.*zoxide.*//g" $HOME/.zshrc sed -i -E "s/.*zoxide.*//g" $HOME/.zshrc
else elif $1; then
$AWD/install-release.sh -r zsh-users/zsh-completions -k tarball -o completions.tar.gz -d "0 src" -p /usr/local/share/zsh/site-functions $AWD/install-release.sh -r zsh-users/zsh-completions -k tarball -o completions.tar.gz -d "0 src" -p /usr/local/share/zsh/site-functions
$AWD/install-release.sh -r ajeetdsouza/zoxide -m x86_64-unknown -p /usr/local/bin -n zoxide -f $AWD/install-release.sh -r ajeetdsouza/zoxide -m x86_64-unknown -p /usr/local/bin -n zoxide -f
fi fi
} }
configure usage(){
echo "Usage: $0 [OPTIONS]";
echo "OPTIONS:";
echo " -s skip install";
}
DO_INSTALL=true;
while getopts ":i" OPT; do
case $OPT in
s)
DO_INSTALL=false;
;;
?)
echo "Invalid Option: -$OPTARG";
usage;
exit 1;;
esac;
done;
configure $DO_INSTALL
+9 -5
View File
@@ -107,7 +107,11 @@ Architectures: $OS_ARCH
config(){ config(){
set_pkg_source set_pkg_source
$AWD/configure.sh if $1; then
$AWD/configure.sh
else
$AWD/configure.sh -s
fi
} }
usage(){ usage(){
@@ -124,7 +128,7 @@ usage(){
} }
PKG_BASE="$AWD/packages-base" PKG_BASE="$AWD/packages-base"
CONFIG_ONLY=false; DO_INSTALL=true;
MIRROR_SOURCE=1; MIRROR_SOURCE=1;
while getopts ":f:ipm:" OPT; do while getopts ":f:ipm:" OPT; do
case $OPT in case $OPT in
@@ -132,7 +136,7 @@ while getopts ":f:ipm:" OPT; do
PKG_BASE=$OPTARG; PKG_BASE=$OPTARG;
;; ;;
c) c)
CONFIG_ONLY=true; DO_INSTALL=false;
;; ;;
m) m)
MIRROR_SOURCE=$OPTARG; MIRROR_SOURCE=$OPTARG;
@@ -144,7 +148,7 @@ while getopts ":f:ipm:" OPT; do
esac; esac;
done; done;
config config $DO_INSTALL
if ! $CONFIG_ONLY; then if $DO_INSTALL; then
$AWD/install.sh $PKG_BASE $AWD/install.sh $PKG_BASE
fi fi