From ad84fa6eb8882130de875f45f5d0e184dc022d34 Mon Sep 17 00:00:00 2001 From: pvincent Date: Thu, 6 Aug 2026 23:21:44 +0400 Subject: [PATCH] fix --- install.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index cb3d3dd..0a06273 100755 --- a/install.sh +++ b/install.sh @@ -11,11 +11,11 @@ function bootstrap { if [[ ! -d "$DESTINATION/miaou-bash" ]]; then local temp_dir temp_dir=$(mktemp -d) - pushd "$temp_dir" || return 2 + pushd "$temp_dir" >/dev/null || return 2 curl -s -O $MAIN_TAR_GZ_URL tar -xzf main.tar.gz --directory "$DESTINATION" echo "directory: miaou-bash successfully deployed to $DESTINATION" - popd || return 3 + popd >/dev/null || return 3 fi local source_bin="$DESTINATION/miaou-bash/bin/miaou-bash" @@ -32,5 +32,9 @@ function bootstrap { [[ "$UID" -ne 0 ]] && echo 'root privilege required' && exit 1 -[[ -v MIAOU_BASH_DIR ]] || bootstrap -miaou-bash "$MIAOU_BASH_DIR/lib/init.bash" +if [[ -v MIAOU_BASH_DIR ]]; then + bootstrap + miaou-bash "$MIAOU_BASH_DIR/lib/init.bash" +else + miaou-bash "$MIAOU_BASH_DIR/lib/self-upgrade.bash" +fi