]>
git.saurik.com Git - cydia.git/blob - Library/move.sh
3 shopt -s extglob nullglob
5 if [[ ${1:0:1} == - ]]; then
23 if [[ ! -e /var
/stash
]]; then
24 mkdir -p /var
/db
/stash
25 /usr
/libexec
/cydia
/setnsfpn
/var
/db
/stash
26 ln -s -t /var
/var
/db
/stash
27 elif [[ -d /var
/stash
]]; then
28 /usr
/libexec
/cydia
/setnsfpn
/var
/stash
31 tmp
=$(mktemp -d /var/stash/_.XXXXXX)
35 chown root.admin
"${tmp}"
37 mkdir -- "${dst}" || {
42 echo -n "${src}" >"${tmp}.lnk"
44 if [[ -e ${src} ]]; then
45 chmod --reference="${src}" "${dst}"
46 chown
--reference="${src}" "${dst}"
48 cp -aT $v "${src}" "${dst}" || {
53 mv $v "${src}" "${src}.moved"
54 ln -s "${dst}" "${src}"
55 rm -rf $v "${src}.moved"
58 chown root.admin
"${dst}"
59 ln -s "${dst}" "${src}"
66 if [[ -d ${dir} && ! -h ${dir} ]]; then
67 used
=$(/usr/libexec/cydia/du -bs "${dir}")
71 if [[ $((used + 524288)) -lt ${free} ]]; then
74 elif [[ ! -e ${dir} ]]; then