From 769328acc39a5c2908f0c8febe57c37b630f4a7f Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Tue, 18 Jun 2024 20:57:48 -0700 Subject: I decided to use `cd ... || exit` instead of `exit 1` Because only exit will still return cd error code, so no need to exit 1. --- sh/ccp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sh/ccp') diff --git a/sh/ccp b/sh/ccp index 0a38755..4083fe8 100755 --- a/sh/ccp +++ b/sh/ccp @@ -3,7 +3,7 @@ ssh pp 'gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type nothing' -cd "$HOME/programs/config_local_arch" || exit 1 +cd "$HOME/programs/config_local_arch" || exit all_branch="$(git branch | awk '{print ($1=="*")?$2:$1}')" all_branch_no_master="$(echo "$all_branch" | grep -v master)" -- cgit v1.2.3-70-g09d2