Skip to content

Commit d781cd7

Browse files
[rosbridge] fix removal of source repo (#347)
2 parents d088e73 + 7a4e5af commit d781cd7

File tree

5 files changed

+50
-25
lines changed

5 files changed

+50
-25
lines changed

ros-rosapi/install.bash

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,24 @@ pkg_dir="${TUE_SYSTEM_DIR}/src/${pkg}"
1010
if [ -e "${pkg_dir}" ]
1111
then
1212
tue-install-debug "Source pkg found in the workspace, removing it, so the system installed version is used"
13-
repo_dir=$(git -C "$(realpath "${pkg_dir}")" rev-parse --show-toplevel)
1413
tue-install-pipe rm "$TUE_SYSTEM_DIR/src/${pkg}"
1514

15+
tue-install-pipe catkin clean --workspace "${TUE_SYSTEM_DIR}" --orphans
16+
else
17+
tue-install-debug "Source pkg already removed"
18+
fi
19+
20+
repo_dir=$(_git_url_to_repos_dir "https://github.com/RobotWebTools/rosbridge_suite.git")
21+
if [ -n "${repo_dir}" ] && [ -d "${repo_dir}" ]
22+
then
1623
links=$(find "$TUE_SYSTEM_DIR"/src -lname "${repo_dir}*")
1724
if [ -n "${repo_dir}" ] && [ -z "${links}" ]
1825
then
1926
tue-install-debug "No symlinks left to repo or a sub-folder of it, deleting it"
20-
# tue-install-pipe rm -rf "${repo_dir}"
27+
tue-install-pipe rm -rf "${repo_dir}"
2128
else
2229
tue-install-debug "Keeping the repo as there still exist symlinks to it in the workspace"
2330
fi
24-
25-
tue-install-pipe catkin clean --workspace "${TUE_SYSTEM_DIR}" --orphans
2631
else
27-
tue-install-debug "Source pkg already removed"
32+
tue-install-debug "Repo already removed"
2833
fi

ros-rosbridge_library/install.bash

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,24 @@ pkg_dir="${TUE_SYSTEM_DIR}/src/${pkg}"
1010
if [ -e "${pkg_dir}" ]
1111
then
1212
tue-install-debug "Source pkg found in the workspace, removing it, so the system installed version is used"
13-
repo_dir=$(git -C "$(realpath "${pkg_dir}")" rev-parse --show-toplevel)
1413
tue-install-pipe rm "$TUE_SYSTEM_DIR/src/${pkg}"
1514

15+
tue-install-pipe catkin clean --workspace "${TUE_SYSTEM_DIR}" --orphans
16+
else
17+
tue-install-debug "Source pkg already removed"
18+
fi
19+
20+
repo_dir=$(_git_url_to_repos_dir "https://github.com/RobotWebTools/rosbridge_suite.git")
21+
if [ -n "${repo_dir}" ] && [ -d "${repo_dir}" ]
22+
then
1623
links=$(find "$TUE_SYSTEM_DIR"/src -lname "${repo_dir}*")
1724
if [ -n "${repo_dir}" ] && [ -z "${links}" ]
1825
then
1926
tue-install-debug "No symlinks left to repo or a sub-folder of it, deleting it"
20-
# tue-install-pipe rm -rf "${repo_dir}"
27+
tue-install-pipe rm -rf "${repo_dir}"
2128
else
2229
tue-install-debug "Keeping the repo as there still exist symlinks to it in the workspace"
2330
fi
24-
25-
tue-install-pipe catkin clean --workspace "${TUE_SYSTEM_DIR}" --orphans
2631
else
27-
tue-install-debug "Source pkg already removed"
32+
tue-install-debug "Repo already removed"
2833
fi

ros-rosbridge_msgs/install.bash

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,24 @@ pkg_dir="${TUE_SYSTEM_DIR}/src/${pkg}"
1010
if [ -e "${pkg_dir}" ]
1111
then
1212
tue-install-debug "Source pkg found in the workspace, removing it, so the system installed version is used"
13-
repo_dir=$(git -C "$(realpath "${pkg_dir}")" rev-parse --show-toplevel)
1413
tue-install-pipe rm "$TUE_SYSTEM_DIR/src/${pkg}"
1514

15+
tue-install-pipe catkin clean --workspace "${TUE_SYSTEM_DIR}" --orphans
16+
else
17+
tue-install-debug "Source pkg already removed"
18+
fi
19+
20+
repo_dir=$(_git_url_to_repos_dir "https://github.com/RobotWebTools/rosbridge_suite.git")
21+
if [ -n "${repo_dir}" ] && [ -d "${repo_dir}" ]
22+
then
1623
links=$(find "$TUE_SYSTEM_DIR"/src -lname "${repo_dir}*")
1724
if [ -n "${repo_dir}" ] && [ -z "${links}" ]
1825
then
1926
tue-install-debug "No symlinks left to repo or a sub-folder of it, deleting it"
20-
# tue-install-pipe rm -rf "${repo_dir}"
27+
tue-install-pipe rm -rf "${repo_dir}"
2128
else
2229
tue-install-debug "Keeping the repo as there still exist symlinks to it in the workspace"
2330
fi
24-
25-
tue-install-pipe catkin clean --workspace "${TUE_SYSTEM_DIR}" --orphans
2631
else
27-
tue-install-debug "Source pkg already removed"
32+
tue-install-debug "Repo already removed"
2833
fi

ros-rosbridge_server/install.bash

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,24 @@ pkg_dir="${TUE_SYSTEM_DIR}/src/${pkg}"
1010
if [ -e "${pkg_dir}" ]
1111
then
1212
tue-install-debug "Source pkg found in the workspace, removing it, so the system installed version is used"
13-
repo_dir=$(git -C "$(realpath "${pkg_dir}")" rev-parse --show-toplevel)
1413
tue-install-pipe rm "$TUE_SYSTEM_DIR/src/${pkg}"
1514

15+
tue-install-pipe catkin clean --workspace "${TUE_SYSTEM_DIR}" --orphans
16+
else
17+
tue-install-debug "Source pkg already removed"
18+
fi
19+
20+
repo_dir=$(_git_url_to_repos_dir "https://github.com/RobotWebTools/rosbridge_suite.git")
21+
if [ -n "${repo_dir}" ] && [ -d "${repo_dir}" ]
22+
then
1623
links=$(find "$TUE_SYSTEM_DIR"/src -lname "${repo_dir}*")
1724
if [ -n "${repo_dir}" ] && [ -z "${links}" ]
1825
then
1926
tue-install-debug "No symlinks left to repo or a sub-folder of it, deleting it"
20-
# tue-install-pipe rm -rf "${repo_dir}"
27+
tue-install-pipe rm -rf "${repo_dir}"
2128
else
2229
tue-install-debug "Keeping the repo as there still exist symlinks to it in the workspace"
2330
fi
24-
25-
tue-install-pipe catkin clean --workspace "${TUE_SYSTEM_DIR}" --orphans
2631
else
27-
tue-install-debug "Source pkg already removed"
32+
tue-install-debug "Repo already removed"
2833
fi

ros-rosbridge_suite/install.bash

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,24 @@ pkg_dir="${TUE_SYSTEM_DIR}/src/${pkg}"
1010
if [ -e "${pkg_dir}" ]
1111
then
1212
tue-install-debug "Source pkg found in the workspace, removing it, so the system installed version is used"
13-
repo_dir=$(git -C "$(realpath "${pkg_dir}")" rev-parse --show-toplevel)
1413
tue-install-pipe rm "$TUE_SYSTEM_DIR/src/${pkg}"
1514

15+
tue-install-pipe catkin clean --workspace "${TUE_SYSTEM_DIR}" --orphans
16+
else
17+
tue-install-debug "Source pkg already removed"
18+
fi
19+
20+
repo_dir=$(_git_url_to_repos_dir "https://github.com/RobotWebTools/rosbridge_suite.git")
21+
if [ -n "${repo_dir}" ] && [ -d "${repo_dir}" ]
22+
then
1623
links=$(find "$TUE_SYSTEM_DIR"/src -lname "${repo_dir}*")
1724
if [ -n "${repo_dir}" ] && [ -z "${links}" ]
1825
then
1926
tue-install-debug "No symlinks left to repo or a sub-folder of it, deleting it"
20-
# tue-install-pipe rm -rf "${repo_dir}"
27+
tue-install-pipe rm -rf "${repo_dir}"
2128
else
2229
tue-install-debug "Keeping the repo as there still exist symlinks to it in the workspace"
2330
fi
24-
25-
tue-install-pipe catkin clean --workspace "${TUE_SYSTEM_DIR}" --orphans
2631
else
27-
tue-install-debug "Source pkg already removed"
32+
tue-install-debug "Repo already removed"
2833
fi

0 commit comments

Comments
 (0)