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##*/}
exit 1
}
+ echo -n "${src}" >"${tmp}.lnk"
+
if [[ -e ${src} ]]; then
chmod --reference="${src}" "${dst}"
chown --reference="${src}" "${dst}"
exit 1
}
- rm -rf $v "${src}"
+ mv $v "${src}" "${src}.moved"
+ ln -s "${dst}" "${src}"
+ rm -rf $v "${src}.moved"
else
chmod 775 "${dst}"
chown root.admin "${dst}"
+ ln -s "${dst}" "${src}"
fi
-
- ln -s "${dst}" "${src}"
- echo -n "${src}" >"${tmp}.lnk"
}
function shift_() {