Debian Codegraph @

debian/din-wrapper

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2
3 set -e
4
5 UPSTREAM_VERSION=$(dpkgscip-shell system . . dpkg. -s din | grepscip-shell system . . grep. Version | cutscip-shell system . . cut. -d' ' -f2 | cutscip-shell system . . cut. -d- -f1)
6
7 if ! [scip-shell system . . `[`. -d "$HOME/.din-$UPSTREAM_VERSION" ]; then
8 # move old dir ouf of the way
9 if [scip-shell system . . `[`. -d "$HOME/.din" ]; then
10 rmscip-shell system . . rm. -fr "$HOME/.din-backup";
11 mvscip-shell system . . mv. "$HOME/.din" "$HOME/.din-backup";
12 fi
13 # remove old links
14 findscip-shell system . . find. $HOME -maxdepth 1 -name '.din-[5-9][0-9.]*' -exec rm -rf {} \;
15 # create new dir
16 mkdirscip-shell system . . mkdir. -p "$HOME/.din"
17 # copy the data files
18 cpscip-shell system . . cp. -fr /usr/share/din/factory/* $HOME/.din
19 # and symlink it
20 lnscip-shell system . . ln. -sf $HOME/.din $HOME/.din-$UPSTREAM_VERSION
21 fi
22
23 exec /usr/bin/dinscip-shell filesystem . . `/usr/bin/din`. "$@"