Created
June 23, 2018 09:15
-
-
Save graffic/ae1c74742a5287b0b2df0e5112060d11 to your computer and use it in GitHub Desktop.
Macports utils
This file contains hidden or 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/bash | |
set -x | |
cd $MACPORTS/var/macports/sources/rsync.macports.org/release/tarballs/ports/ | |
sed -i '' '/libGLU/d' ./lang/erlang/Portfile | |
portindex |
This file contains hidden or 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
#!env zsh | |
var_macports=~/macports/var/macports | |
directories=(software build distfiles packages) | |
cleanup () { | |
final_dir=$var_macports/$1 | |
if [[ ! -d $final_dir ]]; then | |
echo "Nothing to do with $final_dir" | |
return | |
fi | |
echo "Cleanup $final_dir/*" | |
rm -rf $final_dir/* | |
} | |
echo "Uninstall inactive" | |
port uninstall inactive | |
for direct in $directories | |
do | |
cleanup $direct | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment