wget -l 2 -nc -r "http://models.gazebosim.org/" --accept gz
cd models.gazebosim.org
for i in *
do
tar -zvxf "$i/model.tar.gz"
done
cp -vfR * "$HOME/.gazebo/models/"
或者直接写成.sh脚本执行:
gazebo_models.sh
#!/bin/sh
# Download all model archive files
wget -l 2 -nc -r "http://models.gazebosim.org/" --accept gz
# This is the folder into which wget downloads the model archives
cd "models.gazebosim.org"
# Extract all model archives
for i in *
do
tar -zvxf "$i/model.tar.gz"
done
# Copy extracted files to the local model folder
cp -vfR * "$HOME/.gazebo/models/"
网友评论