mirror of
https://github.com/femtofox/femtofox.git
synced 2026-12-04 22:00:21 -05:00
Update femto_package_template.sh
This commit is contained in:
parent
d80265fd7c
commit
eb914176b8
1 changed files with 12 additions and 12 deletions
|
|
@ -50,19 +50,19 @@ upgrade() {
|
|||
|
||||
# Check if already installed. `exit 0` if yes, `exit 1` if no
|
||||
check() {
|
||||
# the following works for cloned repos, but not for apt installs
|
||||
if [ -d "$location" ]; then
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
## the following works for cloned repos, but not for apt installs
|
||||
# if [ -d "$location" ]; then
|
||||
# exit 0
|
||||
# else
|
||||
# exit 1
|
||||
# fi
|
||||
|
||||
# this works for apt packages
|
||||
if dpkg-query -W -f='${Status}' $package_name 2>/dev/null | grep -q "install ok installed"; then
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
## this works for apt packages
|
||||
# if dpkg-query -W -f='${Status}' $package_name 2>/dev/null | grep -q "install ok installed"; then
|
||||
# exit 0
|
||||
# else
|
||||
# exit 1
|
||||
# fi
|
||||
}
|
||||
|
||||
# display license - limit to 2000 chars
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue