Skip to content

Commit 3b54aa0

Browse files
author
ggtrd
committed
improve install from given publication
1 parent 7596d8b commit 3b54aa0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bashpack.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,6 +1041,8 @@ update_cli() {
10411041
# Download only the main file (main by default, or the one of the chosen publication if specified)
10421042
if [ -z "$chosen_publication" ]; then
10431043
download_cli "$URL_FILE/main/$NAME_LOWERCASE.sh" "$downloaded_cli"
1044+
elif [ "$chosen_publication" = "main" ]; then
1045+
download_cli "$HOST_URL_FILE/$NAME_LOWERCASE/main/$NAME_LOWERCASE.sh" "$downloaded_cli"
10441046
else
10451047
download_cli "$HOST_URL_FILE/$NAME_LOWERCASE-$chosen_publication/main/$NAME_LOWERCASE.sh" "$downloaded_cli"
10461048
fi
@@ -1119,8 +1121,8 @@ install_cli() {
11191121
fi
11201122

11211123

1122-
# Check if a publication has been chosen
1123-
if [ "$chosen_publication" = "" ] || [ "$chosen_publication" = "main" ] || [ "$chosen_publication" = "$($NAME_ALIAS --publication)" ]; then
1124+
# Check if a publication has been chosen, and allow to reinstall if the specified publication is the same as the current or is empty
1125+
if [ "$chosen_publication" = "" ] || [ "$chosen_publication" = "$($NAME_ALIAS --publication)" ]; then
11241126

11251127
# Download tarball archive with the default way
11261128
download_cli "$URL_ARCH/tarball/$VERSION" $archive_tmp $archive_dir_tmp

0 commit comments

Comments
 (0)