forked from MatthewVerbryke/gazebo_terrain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
delete_model.sh
executable file
·45 lines (38 loc) · 1.14 KB
/
delete_model.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
# Copyright 2017 University of Cincinnati
# All rights reserved. See LICENSE file at:
# https://github.com/MatthewVerbryke/gazebo_terrain
# Additional copyright may be held by others, as reflected in the commit history.
#Get the Name of the Model Directory
echo "What is the name of the model directory you want to delete?:"
read MODELNAME
# Warning
echo " "
echo "Things to delete:"
echo " "
echo " DIRECTORIES"
echo " /home/$USER/.gazebo/models/$MODELNAME/materials/textures/"
echo " /home/$USER/.gazebo/models/$MODELNAME/materials/"
echo " /home/$USER/.gazebo/models/$MODELNAME/"
echo " "
echo " FILES"
echo " model.config"
echo " model.sdf"
echo " $MODELNAME.png"
echo " "
#Safety Feature
echo "Are you absolutely sure you want to delete this model? Once deleted, you will"
echo "NOT be able to recover it! (Y or n)"
read ANSWER
if [ $ANSWER = Y ]; then
echo " "
else
exit
fi
# Interactively delete all files and directories
if [ -d /home/$USER/.gazebo/models/$MODELNAME ]; then
rm -ri /home/$USER/.gazebo/models/$MODELNAME
fi
echo " "
echo "Program finished. Check to make sure the directory is gone."
#EOF