]> git.saurik.com Git - cydia.git/blobdiff - Library/move.sh
Allow user to select a specific candidate version.
[cydia.git] / Library / move.sh
index c0fc10cda47dad23990b8c57c6d5c19907156a13..54750cd43634b84c674811768745ad32c6fb350e 100755 (executable)
@@ -20,10 +20,20 @@ function df_() {
 function mv_() {
     src=$1
 
-    mkdir -p /var/stash
+    if [[ ! -e /var/stash ]]; then
+        mkdir -p /var/db/stash
+        /usr/libexec/cydia/setnsfpn /var/db/stash
+        ln -s -t /var /var/db/stash
+    elif [[ -d /var/stash ]]; then
+        /usr/libexec/cydia/setnsfpn /var/stash
+    fi
+
     tmp=$(mktemp -d /var/stash/_.XXXXXX)
     dst=${tmp}/${src##*/}
 
+    chmod 755 "${tmp}"
+    chown root.admin "${tmp}"
+
     mkdir -- "${dst}" || {
         rmdir -- "${tmp}"
         exit 1