diff options
author | 2025-03-10 12:00:35 -0700 | |
---|---|---|
committer | 2025-03-10 12:00:35 -0700 | |
commit | a7939b288f83f9ae6bf71a243b54b9b2b2027968 (patch) | |
tree | 27591d63ecd90feb26ae9c263c39e56f988fd920 /shell_utils.sh | |
parent | e13bd368a3adbcbdb542276846ce567ff8802d4f (diff) |
create symlink destination if it doesn't exist for cog workspaces
Bug: 401229933
Change-Id: I0ca4ab547d7d524ec2c9ba2871687a79f657631c
Diffstat (limited to 'shell_utils.sh')
-rw-r--r-- | shell_utils.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/shell_utils.sh b/shell_utils.sh index 3124db598c..61b0ebcb55 100644 --- a/shell_utils.sh +++ b/shell_utils.sh @@ -97,8 +97,11 @@ function setup_cog_symlink() { local out_dir=$(getoutdir) local top=$(gettop) - # return early if out dir is already a symlink + # return early if out dir is already a symlink. if [[ -L "$out_dir" ]]; then + destination=$(readlink "$out_dir") + # ensure the destination exists. + mkdir -p "$destination" return 0 fi |