Created
March 22, 2020 14:34
-
-
Save atgmello/ff1fe134d30b5d528347a26a36af7c89 to your computer and use it in GitHub Desktop.
Conda env removal automation for the DS4A LATAM 2020 course cases.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cd $1 | |
for D in *; do | |
if [ -d "${D}" ]; then | |
echo "Now working at" | |
echo "${D}" | |
echo "..." | |
cd ${D} | |
# Grab correct environment name | |
ds4a_env_name=$(grep "name" osx_env.yml | awk '{print $2}') | |
# Remove the right environment | |
echo "Removing ${ds4a_env_name}" | |
echo "..." | |
conda remove --name ${ds4a_env_name} --all --yes | |
echo "Done!" | |
echo "" | |
cd .. | |
fi | |
done | |
echo "" | |
echo "All done!" | |
echo "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment