💥 fix(install, update): repo branch stuff
This commit is contained in:
+10
-1
@@ -55,7 +55,14 @@ if [[ "$answer" == y ]] || [[ "$skip_prompts" ]]; then
|
|||||||
Send_log "The installer noticed that you're calling the script remotely"
|
Send_log "The installer noticed that you're calling the script remotely"
|
||||||
rm -rf $repo_directory 2> /dev/null
|
rm -rf $repo_directory 2> /dev/null
|
||||||
Send_log "Cloning repository in \`$repo_directory\`..."
|
Send_log "Cloning repository in \`$repo_directory\`..."
|
||||||
git clone https://github.com/retrozinndev/colorshell.git "$repo_directory"
|
if [[ -d $repo_directory ]]; then
|
||||||
|
Send_log "repo is already cloned! let's just fetch the latest changes..."
|
||||||
|
git -C "$repo_directory" stash # if there are changes, let's just stash them
|
||||||
|
git -C "$repo_directory" fetch && git -C "$repo_directory" pull --rebase
|
||||||
|
git -C "$repo_directory" stash pop # pop changes back if there are any
|
||||||
|
else
|
||||||
|
git clone https://github.com/retrozinndev/colorshell.git "$repo_directory"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
Ask "Nice! Do you want to use the stable version instead of the unstable(latest commit)?"
|
Ask "Nice! Do you want to use the stable version instead of the unstable(latest commit)?"
|
||||||
@@ -67,6 +74,8 @@ if [[ "$answer" == y ]] || [[ "$skip_prompts" ]]; then
|
|||||||
Send_log "Done fetching"
|
Send_log "Done fetching"
|
||||||
Send_log "Checking out latest non-pre-release version: $latest_tag"
|
Send_log "Checking out latest non-pre-release version: $latest_tag"
|
||||||
git -C "$repo_directory" checkout $latest_tag > /dev/null 2>&1
|
git -C "$repo_directory" checkout $latest_tag > /dev/null 2>&1
|
||||||
|
else
|
||||||
|
git -C "$repo_directory" checkout ryo > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
Send_log "Starting installation..."
|
Send_log "Starting installation..."
|
||||||
|
|||||||
@@ -89,6 +89,8 @@ if [[ "$answer" == y ]] || [[ "$skip_prompts" ]]; then
|
|||||||
Send_log "Done fetching"
|
Send_log "Done fetching"
|
||||||
Send_log "Checking out latest non-pre-release version: $latest_tag"
|
Send_log "Checking out latest non-pre-release version: $latest_tag"
|
||||||
git -C "$repo_directory" checkout $latest_tag > /dev/null 2>&1
|
git -C "$repo_directory" checkout $latest_tag > /dev/null 2>&1
|
||||||
|
else
|
||||||
|
git -C "$repo_directory" checkout ryo > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
Send_log "Updating..."
|
Send_log "Updating..."
|
||||||
|
|||||||
Reference in New Issue
Block a user