Skip to content

Commit 87bc36d

Browse files
committed
check if symlink exists in bash
1 parent 92b875a commit 87bc36d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

programs/autotension_left_arm.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#!/bin/bash
22

3-
rm ~/.barrett &&
3+
FILE=/home/herb_admin/.barrett
4+
if [ -e "$FILE" ]; then
5+
rm ~/.barrett
6+
fi
47
ln -s /etc/barrett/config_herblaunch_leftarm/ ~/.barrett &&
58

69
# Run the script

programs/autotension_right_arm.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#!/bin/bash
22

3-
rm ~/.barrett &&
3+
FILE=/home/herb_admin/.barrett
4+
if [ -e "$FILE" ]; then
5+
rm ~/.barrett
6+
fi
47
ln -s /etc/barrett/config_herblaunch_rightarm/ ~/.barrett &&
58

69
# Run the script

0 commit comments

Comments
 (0)