diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2008-07-20 05:09:31 +0000 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2010-09-30 07:08:11 +0000 |
commit | d4b6208d03a2b0521c9770ed931115bc88db1eb6 (patch) | |
tree | e9c2b477d6671c8cf1213a2851c2aeea8b47b95e /Library | |
parent | 1ef3da8cf14a6f67b04a4c38b76fd59010d11700 (diff) |
Dealing with disk space issues.
Diffstat (limited to 'Library')
-rwxr-xr-x | Library/move.sh | 11 | ||||
-rwxr-xr-x | Library/space.sh | 12 | ||||
-rwxr-xr-x | Library/startup | 1 |
3 files changed, 22 insertions, 2 deletions
diff --git a/Library/move.sh b/Library/move.sh index 0b9e09d..3cbe799 100755 --- a/Library/move.sh +++ b/Library/move.sh @@ -2,6 +2,13 @@ shopt -s extglob nullglob +if [[ ${1:0:1} == - ]]; then + v=$1 + shift 1 +else + v= +fi + function df_() { free=$(df -B1 "$1") free=${free% *%*} @@ -20,12 +27,12 @@ function mv_() { chmod --reference="${src}" "${dst}" chown --reference="${src}" "${dst}" - cp -aT "${src}" "${dst}" || { + cp -aT $v "${src}" "${dst}" || { rm -rf "${dst}" exit 1 } - rm -rf "${src}" + rm -rf $v "${src}" else chmod 775 "${dst}" chown root.admin "${dst}" diff --git a/Library/space.sh b/Library/space.sh new file mode 100755 index 0000000..953ae57 --- /dev/null +++ b/Library/space.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +for dir in \ + /Applications \ + /Library/Ringtones \ + /Library/Wallpaper \ + /System/Library/Fonts \ + /System/Library/TextInput \ + /usr/share +do + . /usr/libexec/cydia/move.sh -v "${dir}" +done diff --git a/Library/startup b/Library/startup index 7ee6cd3..6efc471 100755 --- a/Library/startup +++ b/Library/startup @@ -1,6 +1,7 @@ #!/bin/bash export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin /usr/libexec/cydia/firmware.sh +/usr/libexec/cydia/space.sh debs=/var/root/Media/Cydia/AutoInstall/*.deb dpkg -i ${debs} rm -f ${debs} |