1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/weblate_ynh.git synced 2024-10-01 13:35:04 +02:00

fix hub config

This commit is contained in:
ericgaspar 2022-08-11 20:50:47 +02:00
parent 58ca24f71b
commit 38111e8433
3 changed files with 15 additions and 21 deletions

View file

@ -1,4 +1,4 @@
__FORGE_WEBSITE__: github.com:
- user: __FORGE_USERNAME__ - user: __FORGE_USERNAME__
oauth_token: __FORGE_TOKEN__ oauth_token: __FORGE_TOKEN__
protocol: https protocol: https

View file

@ -130,20 +130,17 @@ ynh_secure_remove --file="$tempdir"
#================================================= #=================================================
# CONFIGURE HUB # CONFIGURE HUB
#================================================= #=================================================
ynh_script_progression --message="Configure hub..." --weight=1
if [ $used_forge = "GitHub" ] ; then if [ $used_forge = "GitHub" ] ; then
forge_website="github.com" ynh_script_progression --message="Configure hub..." --weight=1
else
forge_website="gitlab.com" mkdir "$final_path/.config/"
fi ynh_add_config --template="../conf/hub_config" --destination="$final_path/.config/hub"
mkdir "$final_path/.config/" cat <<EOF > "$final_path/.bashrc"
ynh_add_config --template="../conf/hub_config" --destination="$final_path/.config/hub" eval "$(hub alias -s /bin/bash)"
cat <<EOF > "$final_path/.bashrc"
eval "$(hub alias -s /bin/bash)"
EOF EOF
fi
#================================================= #=================================================
# PIP INSTALLATION # PIP INSTALLATION

View file

@ -139,20 +139,17 @@ ynh_secure_remove --file="$tempdir"
#================================================= #=================================================
# CONFIGURE HUB # CONFIGURE HUB
#================================================= #=================================================
ynh_script_progression --message="Configure hub..." --weight=2
if [ $used_forge = "GitHub" ] ; then if [ $used_forge = "GitHub" ] ; then
forge_website="github.com" ynh_script_progression --message="Configure hub..." --weight=1
else
forge_website="gitlab.com" mkdir "$final_path/.config/"
fi ynh_add_config --template="../conf/hub_config" --destination="$final_path/.config/hub"
mkdir -p "$final_path/.config/" cat <<EOF > "$final_path/.bashrc"
ynh_add_config --template="../conf/hub_config" --destination="$final_path/.config/hub" eval "$(hub alias -s /bin/bash)"
cat <<EOF > "$final_path/.bashrc"
eval "$(hub alias -s /bin/bash)"
EOF EOF
fi
#================================================= #=================================================
# UPDATE A CONFIG FILE # UPDATE A CONFIG FILE