From 38a4a1f0efbff425b16aa199d125b3ea38a7cc47 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 28 Jun 2018 12:48:20 -0600 Subject: [PATCH] hard remove existing links --- usr/share/install_helper.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr/share/install_helper.sh b/usr/share/install_helper.sh index 2783cae..dae5187 100644 --- a/usr/share/install_helper.sh +++ b/usr/share/install_helper.sh @@ -442,10 +442,13 @@ else fi +# NOTE: ln -sf *should* replace an existing link... but sometimes it doesn't echo " > ${real_sudo_cmde}ln -sf $TELEBIT_REAL_PATH/bin/$my_app /usr/local/bin/$my_app" +rm -f $TELEBIT_REAL_PATH/bin/$my_app || $real_sudo_cmd rm -f $TELEBIT_REAL_PATH/bin/$my_app ln -sf $TELEBIT_REAL_PATH/bin/$my_app /usr/local/bin/$my_app 2>/dev/null || \ $real_sudo_cmd ln -sf $TELEBIT_REAL_PATH/bin/$my_app /usr/local/bin/$my_app echo " > ${real_sudo_cmde}ln -sf $TELEBIT_REAL_PATH/bin/$my_daemon /usr/local/bin/$my_daemon" +rm -f $TELEBIT_REAL_PATH/bin/$my_daemon || $real_sudo_cmd rm -f $TELEBIT_REAL_PATH/bin/$my_daemon ln -sf $TELEBIT_REAL_PATH/bin/$my_daemon /usr/local/bin/$my_daemon || \ $real_sudo_cmd ln -sf $TELEBIT_REAL_PATH/bin/$my_daemon /usr/local/bin/$my_daemon