properly silenced update-git and cd movements

This commit is contained in:
James Tomasino 2018-04-11 22:56:39 -04:00
parent 34b61e9e3a
commit c263bf8903
1 changed files with 3 additions and 3 deletions

6
burrow
View File

@ -51,11 +51,11 @@ arg_rss=0
# silence directory movements
push_d () {
cd "$@" || exit
cd "$@" > /dev/null 2> /dev/null || exit
}
pop_d () {
cd - || exit
cd - > /dev/null 2> /dev/null || exit
}
show_help () {
@ -520,7 +520,7 @@ create_config () {
update_git () {
push_d "$config_dir_gopher"
if git rev-parse --is-inside-work-tree 2> /dev/null; then
if [ "$(git rev-parse --is-inside-work-tree 2> /dev/null)" ]; then
git pull -q > /dev/null 2> /dev/null
fi
pop_d