]> git.saurik.com Git - cydia.git/commitdiff
Dealing with disk space issues.
authorJay Freeman (saurik) <saurik@saurik.com>
Sun, 20 Jul 2008 05:09:31 +0000 (05:09 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Thu, 30 Sep 2010 07:08:11 +0000 (07:08 +0000)
Library/move.sh
Library/space.sh [new file with mode: 0755]
Library/startup

index 0b9e09d2748eca60202ceea473aee1e327cc90ce..3cbe79944d6d3adbf267c9b845f3072ceab4c5a9 100755 (executable)
@@ -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 (executable)
index 0000000..953ae57
--- /dev/null
@@ -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
index 7ee6cd3e54f022fd58793c37a9536a043ebe2a15..6efc471dd58d8d6932af4b629aa0642a60b1528f 100755 (executable)
@@ -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}