]> git.saurik.com Git - cydia.git/blobdiff - Library/move.sh
Update Cydia for BrowserController changes; also untested and uncompiled.
[cydia.git] / Library / move.sh
index 3cbe79944d6d3adbf267c9b845f3072ceab4c5a9..4a15ca711039e23e032041c2067cee251bf24023 100755 (executable)
@@ -21,7 +21,7 @@ function mv_() {
     src=$1
 
     mkdir -p /var/stash
-    dst=$(mktemp -d /var/stash/$(basename "${src}").XXXXXX)
+    dst=$(mktemp -d /var/stash/"${src##*/}".XXXXXX)
 
     if [[ -e ${src} ]]; then
         chmod --reference="${src}" "${dst}"
@@ -42,10 +42,10 @@ function mv_() {
 }
 
 function shift_() {
-    dir=$1
+    dir=${1%/}
 
     if [[ -d ${dir} && ! -h ${dir} ]]; then
-        used=$(du -bs "${dir}")
+        used=$(/usr/libexec/cydia/du -bs "${dir}")
         used=${used%%$'\t'*}
         free=$(df_ /var)