Merge pull request #230 from linuxserver/universal-git-apt

standardize apt-get, update formatting
This commit is contained in:
Roxedus 2021-06-29 18:09:17 +02:00 committed by GitHub
commit e609560318
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 11 deletions

View File

@ -0,0 +1,5 @@
#!/usr/bin/with-contenv bash
if [ -f /usr/bin/apt ]; then
apt-get update
fi

View File

@ -2,15 +2,14 @@
# Determine if setup is needed
if ! command -v git; then
## Ubuntu
if [ -f /usr/bin/apt ]; then
apt-get update
apt-get install --no-install-recommends -y \
git
fi
# Alpine
if [ -f /sbin/apk ]; then
apk add --no-cache \
git
fi
## Ubuntu
if [ -f /usr/bin/apt ]; then
apt-get install --no-install-recommends -y \
git
fi
# Alpine
if [ -f /sbin/apk ]; then
apk add --no-cache \
git
fi
fi