mirror of
https://github.com/linuxserver/docker-mods.git
synced 2026-02-05 04:59:42 +08:00
Merge pull request #230 from linuxserver/universal-git-apt
standardize apt-get, update formatting
This commit is contained in:
commit
e609560318
5
root/etc/cont-init.d/95-apt-get
Normal file
5
root/etc/cont-init.d/95-apt-get
Normal file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
if [ -f /usr/bin/apt ]; then
|
||||
apt-get update
|
||||
fi
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user