summaryrefslogtreecommitdiff
path: root/over/usr/libexec/cydia
diff options
context:
space:
mode:
authorJay Freeman <saurik@saurik.com>2008-02-14 14:32:59 +0000
committerJay Freeman <saurik@saurik.com>2008-02-14 14:32:59 +0000
commit6b964b69935fcc52a1c0a95695ca436e00b6690f (patch)
treea863dd50c7cc7fe19b9759360ed4d5b545f9ba0f /over/usr/libexec/cydia
parent459c9779557e19437de4a02f6311c322989228b3 (diff)
Drastically reworked bootstrap package.
git-svn-id: http://svn.telesphoreo.org/trunk@88 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'over/usr/libexec/cydia')
-rwxr-xr-xover/usr/libexec/cydia/boot/godmodebin0 -> 8956 bytes
-rwxr-xr-xover/usr/libexec/cydia/boot/install.sh38
2 files changed, 38 insertions, 0 deletions
diff --git a/over/usr/libexec/cydia/boot/godmode b/over/usr/libexec/cydia/boot/godmode
new file mode 100755
index 000000000..9ff8ec9eb
--- /dev/null
+++ b/over/usr/libexec/cydia/boot/godmode
Binary files differ
diff --git a/over/usr/libexec/cydia/boot/install.sh b/over/usr/libexec/cydia/boot/install.sh
new file mode 100755
index 000000000..455a27a38
--- /dev/null
+++ b/over/usr/libexec/cydia/boot/install.sh
@@ -0,0 +1,38 @@
+#!/usr/libexec/cydia/boot/bash
+
+shopt -s extglob nullglob
+export PATH=/usr/libexec/cydia/boot
+
+function df_() {
+ free=$(df -B1 "$1")
+ free=${free% *%*}
+ free=${free%%*( )}
+ free=${free##* }
+ echo "${free}"
+}
+
+for dir in \
+ /Applications \
+ /Library/Ringtones \
+ /Library/Wallpaper \
+ /System/Library/Fonts \
+ /usr/share
+do if [[ -d ${dir} && ! -h ${dir} ]]; then
+ used=$(du -bs "${dir}")
+ used=${used%%$'\t'*}
+ free=$(df_ /var)
+
+ if [[ ${used} -lt ${free} ]]; then
+ base=$(basename "${dir}")
+
+ new=/var/${base}
+ if [[ -e ${new} ]]; then
+ new=$(mktemp -d cydia.XXXXXX)
+ fi
+
+ godmode mv -T "${dir}" "${new}"
+ godmode ln -s "${new}" "${dir}"
+ fi
+fi; done
+
+[[ $(df_ /) -gt 33554432 && $(df_ /var) -gt 33554432 ]]