Created
June 1, 2014 20:12
-
-
Save jacobsalmela/b6eb38c5ddd147f39645 to your computer and use it in GitHub Desktop.
Saves Mac App Store packages if they are paused before finished downloading.
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=$(sudo find /private/var/folders -type f -name "*.pkg") | |
i=0 | |
for package in $appStoreFolder | |
do | |
# Make a hard link of the package in the Downloads folder | |
sudo ln $package ~/Downloads/_MAS_$i.pkg | |
# Increment by one in case there are more .pkgs to save | |
i=$(($i+1)) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment