File tree Expand file tree Collapse file tree 1 file changed +18
-8
lines changed
Expand file tree Collapse file tree 1 file changed +18
-8
lines changed Original file line number Diff line number Diff line change 2828URL=" https://api.github.com/repos/bashpack-project/bashpack/tarball" # for Github tarball
2929# URL="https://github.com/bashpack-project/bashpack/archive/refs/heads" # for Github main branch
3030
31- VERSION=" 0.2.19 "
31+ VERSION=" 0.2.20 "
3232
3333NAME=" Bashpack"
3434NAME_LOWERCASE=$( echo " $NAME " | tr A-Z a-z)
@@ -203,12 +203,21 @@ COMMAND_SYSTEMD_STATUS="systemctl status $file_systemd_update.timer"
203203# Delete the installed command from the system
204204delete_cli () {
205205
206- local files=(
207- $dir_src
208- $file_autocompletion
209- $file_main_alias
210- $file_main
211- )
206+ local exclude_main=${1}
207+
208+ if [[ $exclude_main = " exclude_main" ]]; then
209+ local files=(
210+ $dir_src
211+ $file_autocompletion
212+ )
213+ else
214+ local files=(
215+ $dir_src
216+ $file_autocompletion
217+ $file_main_alias
218+ $file_main
219+ )
220+ fi
212221
213222
214223 if [[ $( exists_command " $NAME_ALIAS " ) != " exists" ]]; then
@@ -286,7 +295,7 @@ delete_systemd() {
286295
287296# Helper function to assemble all functions that delete something
288297delete_all () {
289- delete_systemd && delete_cli
298+ delete_systemd && delete_cli
290299}
291300
292301
@@ -474,6 +483,7 @@ update_cli() {
474483 # # Delete current installed version to clean all old files
475484 # /!\ Deactivated for now because if we delete the last release from Github, the CLI is just beeing removed from the system...
476485 # delete_all
486+ delete_systemd && delete_cli exclude_main
477487
478488 echo " "
479489
You can’t perform that action at this time.
0 commit comments