Created
January 28, 2015 09:19
-
-
Save mkuron/46c64a35deb41341f3c5 to your computer and use it in GitHub Desktop.
Mac App Store .pkg file grabber
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/bash | |
appstorefolder=$TMPDIR/../C/com.apple.appstore | |
while true; do | |
packages=$(find $appstorefolder -type f -name "*.pkg") | |
for package in $packages | |
do | |
pkgname=$(basename "$package") | |
if [ -f "$HOME/Downloads/$pkgname" ]; then | |
continue | |
fi | |
echo "=== Found $package ===" | |
ln -h "$package" "$HOME/Downloads/$pkgname" | |
#pkgutil --payload-files $package | head -n 3 | |
done | |
sleep 0.1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment