commit f797547f88296faffb4a5e5381defd37d850c7ac parent 203754e232e746f051e947971fed87ba4ed6bf74 Author: Chris Bracken <chris@bracken.jp> Date: Thu, 10 Feb 2022 09:51:56 -0800 Keep source files under ~/Developer on macOS Use ~/Developer if present, otherwise fall back to ~/src. Diffstat:
M | .paths | | | 18 | +++++++++++------- |
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/.paths b/.paths @@ -30,13 +30,17 @@ path_append() { # Push /usr/local/bin to the front of PATH path_prepend "/usr/local/bin" +# Platform-specific source directory +[[ -d "$HOME/src" ]] && SRC_ROOT="$HOME/src" +[[ -d "$HOME/Developer" ]] && SRC_ROOT="$HOME/Developer" + # Fuchsia/Flutter -path_prepend "$HOME/src/depot_tools" -path_prepend "$HOME/src/flutter/flutter/bin" -path_prepend "$HOME/src/flutter/flutter/bin/cache/dart-sdk/bin" -path_prepend "$HOME/src/fuchsia/.jiri_root/bin" -if [[ -e "$HOME/src/fuchsia/.jiri_root/scripts/fx-env.sh" ]]; then - source "$HOME/src/fuchsia/.jiri_root/scripts/fx-env.sh" +path_prepend "$SRC_ROOT/depot_tools" +path_prepend "$SRC_ROOT/flutter/flutter/bin" +path_prepend "$SRC_ROOT/flutter/flutter/bin/cache/dart-sdk/bin" +path_prepend "$SRC_ROOT/fuchsia/.jiri_root/bin" +if [[ -e "$SRC_ROOT/fuchsia/.jiri_root/scripts/fx-env.sh" ]]; then + source "$SRC_ROOT/fuchsia/.jiri_root/scripts/fx-env.sh" fi # Homebrew @@ -53,7 +57,7 @@ fi path_prepend "$HOME/.cargo/bin" # Google Cloud SDK -path_prepend "$HOME/src/google-cloud-sdk/bin" +path_prepend "$SRC_ROOT/google-cloud-sdk/bin" # User's personal bin dir if it exists path_prepend "$HOME/.local/bin"