mirror of
https://github.com/bitnami/containers.git
synced 2026-03-11 07:39:06 +08:00
2.7.17-ol-7-r95 release
This commit is contained in:
29
bitnami/python/2/ol-7/prebuildfs/usr/local/bin/install_packages
Executable file
29
bitnami/python/2/ol-7/prebuildfs/usr/local/bin/install_packages
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
if [[ -n "oracle-epel-release-el7" ]]; then
|
||||
if ! yum list installed oracle-epel-release-el7 >/dev/null 2>&1; then
|
||||
yum -y install oracle-epel-release-el7 >/dev/null 2>&1
|
||||
CODE=$?
|
||||
if (( $CODE != 0 )); then
|
||||
echo "EPEL repository installation failed"
|
||||
exit $CODE
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
max=2
|
||||
for ((n = 1 ; n <= max ; n+=1 )); do
|
||||
set +e
|
||||
yum --enablerepo base,updates,ol7_developer_EPEL,ol7_optional_latest install -y "$@"
|
||||
CODE=$?
|
||||
set -e
|
||||
if (( $CODE == 0 )); then
|
||||
break
|
||||
fi
|
||||
if (( $n == $max )); then
|
||||
exit $CODE
|
||||
fi
|
||||
echo "yum failed, retrying"
|
||||
done
|
||||
rm -r /var/cache/yum
|
||||
Reference in New Issue
Block a user