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
################################################################################
function _init_pman() {
function _init_config() {
if [ ! -f .pman.conf ]; then
ac_set_tmpfile config
cp "$ConfigFile" "$config"
@ -63,7 +63,7 @@ function init_repo_action() {
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"
git symbolic-ref HEAD "refs/heads/$MAIN"
@ -77,12 +77,12 @@ function init_repo_action() {
_push_branches
}
function init_pman_action() {
function init_config_action() {
[ -f .pman.conf ] || die "La configuration pman a déjà été initialisée"
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
@ -190,7 +190,7 @@ function init_action() {
local what="${1:-develop}"; shift
case "$what" in
init|repo|r) init_repo_action "$@";;
pman) init_pman_action "$@";;
config) init_config_action "$@";;
main|m) git checkout -q "$MAIN";;
develop|dev|d) init_develop_action "$@";;
upstream|up|u) init_upstream_action "$@";;