tools/install,etc: Add quote around path variables to handle case with space in $HOME or $OSH

This commit is contained in:
nmarghetti
2020-12-18 01:09:17 +01:00
committed by Koichi Murase
parent b88cbd312c
commit 6fd237c363
4 changed files with 4 additions and 4 deletions

View File

@@ -37,7 +37,7 @@
if [ ! -n "$SDIRS" ]; then
SDIRS=~/.sdirs
fi
touch $SDIRS
touch "$SDIRS"
# main function
function bm {

View File

@@ -152,7 +152,7 @@ ___brainy_prompt_clock() {
}
___brainy_prompt_battery() {
[ ! -e $OSH/plugins/battery/battery.plugin.sh ] ||
[ ! -e "$OSH/plugins/battery/battery.plugin.sh" ] ||
[ "${THEME_SHOW_BATTERY}" != "true" ] && return
info=$(battery_percentage)
color=$_omb_prompt_bold_green

View File

@@ -137,7 +137,7 @@ _omb_install_user_bashrc() {
printf "${BLUE}Using the Oh My Bash template file and adding it to ~/.bashrc${NORMAL}\n"
_omb_install_run cp "$OSH"/templates/bashrc.osh-template ~/.bashrc
sed "/^export OSH=/ c\\
export OSH=$OSH
export OSH='${OSH//\'/\'\\\'\'}'
" ~/.bashrc >| ~/.bashrc.omb-temp
_omb_install_run mv -f ~/.bashrc.omb-temp ~/.bashrc