Skip to content

Commit

Permalink
fix: bump to v2.1.1
Browse files Browse the repository at this point in the history
fix incorrect modcfg value for extra git info in cfg.sh
fix missing resets in update.sh
  • Loading branch information
0vf committed Aug 18, 2023
1 parent 5fddc5c commit 099e93b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion commands/cfg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pbash_cfg() {
read -r -p "Type one of the numbers shown above: " REPLY
case "$REPLY" in
1) pbash modcfg show_extra_git_info true;exit_cleanup;;
2) pbash modcfg show_git_info false;exit_cleanup;;
2) pbash modcfg show_extra_git_info false;exit_cleanup;;
*) config_git_2;;
esac
}
Expand Down
10 changes: 5 additions & 5 deletions commands/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ environment:
'

pbash_update() {
printf "${__pbash_command_prefix} checking for updates...\n\e"
printf "${__pbash_command_prefix} checking for updates...\n\e[m"
if [[ ! -d "${__pbash_installation_dir}/.git" ]]; then printf "${__pbash_command_prefix} $(fc2 1)powerbash was not installed from a git repository, most likely installed by a package manager. cannot proceed with the upgrade\n\e[m" && return 1; fi
cd ${__pbash_installation_dir}
# set the path to the original git repo
Expand All @@ -21,17 +21,17 @@ pbash_update() {
CURRENT_COMMIT=$(git log --pretty=format:"%H" -n 1)
# check if the hashes are the same
if [[ "$LATEST_COMMIT" == "$CURRENT_COMMIT" ]]; then
printf "${__pbash_command_prefix} up to date!\n\e"
printf "${__pbash_command_prefix} up to date!\n\e[m"
cd "$OLDPWD"
else
# check if the command was executed with $CHECK_ONLY or not
if [[ "$CHECK_ONLY" != "true" ]]; then
[[ "${__pbash_installation_dir}" == "$HOME"* ]] || { printf "${__pbash_command_prefix} $(fc2 1)powerbash was not in installed in your home directory, aborting upgrade.\n\e[m" && cd "${OLDPWD}" && return 1; }
printf "${__pbash_command_prefix} update available, updating...\n\e"
printf "${__pbash_command_prefix} update available, updating...\n\e[m"
git pull --quiet
printf "${__pbash_command_prefix} up to date! run exec bash for the changes to apply\n\e"
printf "${__pbash_command_prefix} up to date! run exec bash for the changes to apply\n\e[m"
else
printf "${__pbash_command_prefix} update available! run $(fc2 6)pbash update$(fc2 255) to update.\n\e"
printf "${__pbash_command_prefix} update available! run $(fc2 6)pbash update$(fc2 255) to update.\n\e[m"
fi
cd "$OLDPWD"
fi
Expand Down
2 changes: 1 addition & 1 deletion powerbash.bash-theme
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ __pbash_installation_dir=$(dirname "${BASH_SOURCE[0]}")
[ -d "${__pbash_installation_dir}/modules" ] && for file in "${__pbash_installation_dir}/modules"/*; do [ -f "$file" ] && source "$file"; done
[ -d "${__pbash_installation_dir}/commands" ] && for file in "${__pbash_installation_dir}/commands"/*; do [ -f "$file" ] && source "$file"; done
__pbash_command_prefix="$(fc2 6)pbash $(fc2 255)"
__pbash_current_version="2.1.0"
__pbash_current_version="2.1.1"
if [[ "$__pbash_shorten_directory" != "false" ]]; then
PROMPT_DIRTRIM=4
fi
Expand Down

0 comments on commit 099e93b

Please sign in to comment.