maj runphp

This commit is contained in:
Jephté Clain 2024-10-18 16:27:43 +04:00
parent 09b68a9335
commit c4afe0b21e
4 changed files with 18 additions and 8 deletions

8
.runphp.conf Normal file
View File

@ -0,0 +1,8 @@
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
# Chemin vers runphp, e.g sbin/runphp
RUNPHP=
# Si RUNPHP n'est pas défini, les variables suivantes peuvent être définies
DIST=d11
#REGISTRY=pubdocker.univ-reunion.fr

View File

@ -128,8 +128,8 @@ function build_images() {
case "$image" in case "$image" in
runphp) runphp)
[ ${#Configs[*]} -gt 0 ] && export RUNPHP_FORCE_BUILDENVS="${Configs[*]}" [ ${#Configs[*]} -gt 0 ] && export RUNPHP_FORCE_BUILDENVS="${Configs[*]}"
local -a args=(--bootstrap) local -a args=(--bs)
[ "$ForceBuild" != all ] && args+=(--unless-exists) [ "$ForceBuild" != all ] && args+=(--ue)
[ -n "$Pull" ] && args+=(--pull) [ -n "$Pull" ] && args+=(--pull)
[ -n "$NoCache" ] && args+=(--no-cache) [ -n "$NoCache" ] && args+=(--no-cache)
"$RUNPHP" "${args[@]}" || die "$RUNPHP" "${args[@]}" || die

View File

@ -300,7 +300,7 @@ if [ "$RUNPHP_MODE" != docker ]; then
) )
SOPTS=+d:9876543210:c:UjDx:z:r:p SOPTS=+d:9876543210:c:UjDx:z:r:p
LOPTS=help,dist:,d19,d18,d17,d16,d15,d14,d13,d12,d11,d10,config:,ue,unless-exists,pull,nc,no-cache,po,plain-output,apt-proxy:,timezone:,privareg:,push,no-use-rslave LOPTS=help,dist:,d19,d18,d17,d16,d15,d14,d13,d12,d11,d10,config:,ue,unless-exists,pull,nc,no-cache,po,plain-output,apt-proxy:,timezone:,privareg:,push,ci,no-use-rslave
args="$(getopt -n "$MYNAME" -o "$SOPTS" -l "$LOPTS" -- "$@")" || exit 1; eval "set -- $args" args="$(getopt -n "$MYNAME" -o "$SOPTS" -l "$LOPTS" -- "$@")" || exit 1; eval "set -- $args"
Dist= Dist=
@ -352,6 +352,7 @@ OPTIONS
-z|--timezone) shift; TIMEZONE="$1";; -z|--timezone) shift; TIMEZONE="$1";;
-r|--privareg) shift; PRIVAREG="$1";; -r|--privareg) shift; PRIVAREG="$1";;
-p|--push) Push=1;; -p|--push) Push=1;;
--ci) ComposerInstall=1;;
--no-use-rslave) UseRslave=;; --no-use-rslave) UseRslave=;;
*) die "$1: option non configurée";; *) die "$1: option non configurée";;
esac esac
@ -417,7 +418,7 @@ OPTIONS
# Forcer l'installation des dépendances si nécessaire # Forcer l'installation des dépendances si nécessaire
ComposerInstall=1 ComposerInstall=1
fi fi
[ -z "$ComposerInstall" ] && exit 0 [ -z "$ComposerInstall" -o -n "$UnlessExists" ] && exit 0
else else
## Mode exécution de commande ########################################## ## Mode exécution de commande ##########################################
@ -524,7 +525,7 @@ OPTIONS
"$IMAGE" "$IMAGE"
exec "$0" ${Chdir:+-w "$Chdir"} exec "$0" ${Chdir:+-w "$Chdir"}
) )
[ -n "$ForcedBootstrap" ] && set -- ci [ -n "$ComposerInstall" ] && set -- ci
[ -n "$Verbose" ] && eecho "\$ docker ${args[*]} $*" [ -n "$Verbose" ] && eecho "\$ docker ${args[*]} $*"
exec docker "${args[@]}" "$@" exec docker "${args[@]}" "$@"

View File

@ -251,7 +251,7 @@ if [ "$RUNPHP_MODE" != docker ]; then
) )
SOPTS=+d:9876543210:c:UjDx:z:r:p SOPTS=+d:9876543210:c:UjDx:z:r:p
LOPTS=help,dist:,d19,d18,d17,d16,d15,d14,d13,d12,d11,d10,config:,ue,unless-exists,pull,nc,no-cache,po,plain-output,apt-proxy:,timezone:,privareg:,push,no-use-rslave LOPTS=help,dist:,d19,d18,d17,d16,d15,d14,d13,d12,d11,d10,config:,ue,unless-exists,pull,nc,no-cache,po,plain-output,apt-proxy:,timezone:,privareg:,push,ci,no-use-rslave
args="$(getopt -n "$MYNAME" -o "$SOPTS" -l "$LOPTS" -- "$@")" || exit 1; eval "set -- $args" args="$(getopt -n "$MYNAME" -o "$SOPTS" -l "$LOPTS" -- "$@")" || exit 1; eval "set -- $args"
Dist= Dist=
@ -303,6 +303,7 @@ OPTIONS
-z|--timezone) shift; TIMEZONE="$1";; -z|--timezone) shift; TIMEZONE="$1";;
-r|--privareg) shift; PRIVAREG="$1";; -r|--privareg) shift; PRIVAREG="$1";;
-p|--push) Push=1;; -p|--push) Push=1;;
--ci) ComposerInstall=1;;
--no-use-rslave) UseRslave=;; --no-use-rslave) UseRslave=;;
*) die "$1: option non configurée";; *) die "$1: option non configurée";;
esac esac
@ -368,7 +369,7 @@ OPTIONS
# Forcer l'installation des dépendances si nécessaire # Forcer l'installation des dépendances si nécessaire
ComposerInstall=1 ComposerInstall=1
fi fi
[ -z "$ComposerInstall" ] && exit 0 [ -z "$ComposerInstall" -o -n "$UnlessExists" ] && exit 0
else else
## Mode exécution de commande ########################################## ## Mode exécution de commande ##########################################
@ -475,7 +476,7 @@ OPTIONS
"$IMAGE" "$IMAGE"
exec "$0" ${Chdir:+-w "$Chdir"} exec "$0" ${Chdir:+-w "$Chdir"}
) )
[ -n "$ForcedBootstrap" ] && set -- ci [ -n "$ComposerInstall" ] && set -- ci
[ -n "$Verbose" ] && eecho "\$ docker ${args[*]} $*" [ -n "$Verbose" ] && eecho "\$ docker ${args[*]} $*"
exec docker "${args[@]}" "$@" exec docker "${args[@]}" "$@"