changed the layout, should not effect script behaviour
This commit is contained in:
parent
293c4b9965
commit
0997cf8a9c
15 changed files with 386 additions and 294 deletions
58
yazi.sh
58
yazi.sh
|
@ -6,30 +6,6 @@
|
|||
command -v "$@" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
# ─< package variable >───────────────────────────────────────────────────────────────────
|
||||
unset PACKAGE
|
||||
|
||||
# ─< argument list variables >────────────────────────────────────────────────────────────
|
||||
silent=false
|
||||
|
||||
sleep 0.1
|
||||
|
||||
PACKAGE=yazi
|
||||
if command_exists "$PACKAGE"; then
|
||||
echo_warning "$PACKAGE is already installed!"
|
||||
echo_warning "Exiting now!"
|
||||
exit 69
|
||||
fi
|
||||
|
||||
# ─< parse arguments and get variable contents >──────────────────────────────────────────
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
--silent | -s)
|
||||
export silent=true
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# WHY:
|
||||
# This import will give you the following variables:
|
||||
# _sudo="sudo -E" <- only if non root user
|
||||
|
@ -80,11 +56,11 @@
|
|||
|
||||
declare -A deps=(
|
||||
[debian]="depsDebian"
|
||||
[ubuntu]="depsUbuntu"
|
||||
[fedora]="depsFedora"
|
||||
[arch]="depsArch"
|
||||
[alpine]="depsAlpine"
|
||||
[opensuse]="depsOpensuse"
|
||||
[ubuntu]="depsDebian"
|
||||
# [fedora]="depsFedora"
|
||||
# [arch]="depsArch"
|
||||
# [alpine]="depsAlpine"
|
||||
# [opensuse]="depsOpensuse"
|
||||
)
|
||||
|
||||
# INFO:
|
||||
|
@ -179,6 +155,30 @@
|
|||
}
|
||||
|
||||
if getImports; then
|
||||
# ─< package variable >───────────────────────────────────────────────────────────────────
|
||||
unset PACKAGE
|
||||
|
||||
# ─< argument list variables >────────────────────────────────────────────────────────────
|
||||
silent=false
|
||||
|
||||
sleep 0.1
|
||||
|
||||
PACKAGE=yazi
|
||||
if command_exists "$PACKAGE"; then
|
||||
echo_warning "$PACKAGE is already installed!"
|
||||
echo_warning "Exiting now!"
|
||||
exit 69
|
||||
fi
|
||||
|
||||
# ─< parse arguments and get variable contents >──────────────────────────────────────────
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
--silent | -s)
|
||||
export silent=true
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
main
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue