From 38111e84335d007074a2f03b28b223c41b70c4f6 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 11 Aug 2022 20:50:47 +0200 Subject: [PATCH] fix hub config --- conf/hub_config | 2 +- scripts/install | 17 +++++++---------- scripts/upgrade | 17 +++++++---------- 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/conf/hub_config b/conf/hub_config index 37d9b23..75944f2 100644 --- a/conf/hub_config +++ b/conf/hub_config @@ -1,4 +1,4 @@ -__FORGE_WEBSITE__: +github.com: - user: __FORGE_USERNAME__ oauth_token: __FORGE_TOKEN__ protocol: https diff --git a/scripts/install b/scripts/install index 0824faf..357b07f 100755 --- a/scripts/install +++ b/scripts/install @@ -130,20 +130,17 @@ ynh_secure_remove --file="$tempdir" #================================================= # CONFIGURE HUB #================================================= -ynh_script_progression --message="Configure hub..." --weight=1 if [ $used_forge = "GitHub" ] ; then - forge_website="github.com" -else - forge_website="gitlab.com" -fi + ynh_script_progression --message="Configure hub..." --weight=1 + + mkdir "$final_path/.config/" + ynh_add_config --template="../conf/hub_config" --destination="$final_path/.config/hub" -mkdir "$final_path/.config/" -ynh_add_config --template="../conf/hub_config" --destination="$final_path/.config/hub" - -cat < "$final_path/.bashrc" -eval "$(hub alias -s /bin/bash)" + cat < "$final_path/.bashrc" + eval "$(hub alias -s /bin/bash)" EOF +fi #================================================= # PIP INSTALLATION diff --git a/scripts/upgrade b/scripts/upgrade index 34b6691..6a5b8bb 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -139,20 +139,17 @@ ynh_secure_remove --file="$tempdir" #================================================= # CONFIGURE HUB #================================================= -ynh_script_progression --message="Configure hub..." --weight=2 if [ $used_forge = "GitHub" ] ; then - forge_website="github.com" -else - forge_website="gitlab.com" -fi + ynh_script_progression --message="Configure hub..." --weight=1 + + mkdir "$final_path/.config/" + ynh_add_config --template="../conf/hub_config" --destination="$final_path/.config/hub" -mkdir -p "$final_path/.config/" -ynh_add_config --template="../conf/hub_config" --destination="$final_path/.config/hub" - -cat < "$final_path/.bashrc" -eval "$(hub alias -s /bin/bash)" + cat < "$final_path/.bashrc" + eval "$(hub alias -s /bin/bash)" EOF +fi #================================================= # UPDATE A CONFIG FILE