Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add functionality for finding and removing core.* files. #214

Merged
merged 8 commits into from
Jun 25, 2024
25 changes: 25 additions & 0 deletions scripts/_Team_Defines.bash
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,31 @@ alias ros2_control_setup-controller-package=$RosTeamWS_FRAMEWORK_SCRIPTS_PATH/ro
# setup auto-sourcing
alias setup-auto-sourcing=$RosTeamWS_FRAMEWORK_SCRIPTS_PATH/setup_auto_sourcing.bash

# VCS Aliases and helpers
function rtw-ws-import () {
# TODO: if not argument use WS default path for this after #169 is merged
vcs import --debug -w 1 --input "$*" $ROS_WS/src
}

# Temporary files cleaning
function rtw-find-and-remove-core-files () {
if [ -z "$1" ]; then
search_dir="${HOME}"
else
search_dir=$1
fi

find "${search_dir}" -type f -regex ".*core\.[0-9]+"

user_decision "Do you want to delete those files?" user_answer
if [[ " ${positive_answers[*]} " =~ " ${user_answer} " ]]; then
find "${search_dir}" -type f -regex ".*core\.[0-9]+" -delete
notify_user "Files ARE deleted!"
else
notify_user "Files NOT deleted!"
fi
}

# Team General aliases and functions
function generate_gif_from_video {

Expand Down
Loading