blob: fc90f25998aa3e7235cabb4c44829c14171caf24 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/bin/bash
shopt -s extglob
function stash() {
src=$1
dst=var/stash/${src##*/}
mv "${src}" "${dst}"
dst=${src//+([A-Za-z])/..}/${dst}
ln -s "${dst#../}" "${src}"
}
mnt=$1
cd "${mnt}"
mkdir -p var/stash
mkdir -p usr/include
stash Applications
stash Library/Ringtones
stash Library/Wallpaper
stash usr/include
stash usr/libexec
stash usr/share
|