This commit is contained in:
Jephté Clain 2025-03-01 14:00:55 +04:00
parent 0f4636fa77
commit 3d55e81899

View File

@ -34,7 +34,7 @@ function show_action() {
# Initialisation # Initialisation
################################################################################ ################################################################################
function _init_pman() { function _init_config() {
if [ ! -f .pman.conf ]; then if [ ! -f .pman.conf ]; then
ac_set_tmpfile config ac_set_tmpfile config
cp "$ConfigFile" "$config" cp "$ConfigFile" "$config"
@ -63,7 +63,7 @@ function init_repo_action() {
local -a push_branches local -a push_branches
_init_pman || exit_with ewarn "Initialisation du dépôt annulée" _init_config || exit_with ewarn "Initialisation du dépôt annulée"
einfo "Création de la branche $MAIN" einfo "Création de la branche $MAIN"
git symbolic-ref HEAD "refs/heads/$MAIN" git symbolic-ref HEAD "refs/heads/$MAIN"
@ -77,12 +77,12 @@ function init_repo_action() {
_push_branches _push_branches
} }
function init_pman_action() { function init_config_action() {
[ -f .pman.conf ] || die "La configuration pman a déjà été initialisée" [ -f .pman.conf ] || die "La configuration pman a déjà été initialisée"
local -a push_branches local -a push_branches
_init_pman || exit_with ewarn "Initialisation de la configuration annulée" _init_config || exit_with ewarn "Initialisation de la configuration annulée"
push_branches+=("$CurrentBranch") push_branches+=("$CurrentBranch")
_push_branches _push_branches
@ -190,7 +190,7 @@ function init_action() {
local what="${1:-develop}"; shift local what="${1:-develop}"; shift
case "$what" in case "$what" in
init|repo|r) init_repo_action "$@";; init|repo|r) init_repo_action "$@";;
pman) init_pman_action "$@";; config) init_config_action "$@";;
main|m) git checkout -q "$MAIN";; main|m) git checkout -q "$MAIN";;
develop|dev|d) init_develop_action "$@";; develop|dev|d) init_develop_action "$@";;
upstream|up|u) init_upstream_action "$@";; upstream|up|u) init_upstream_action "$@";;