4
if [ -d ~/.stdhome.orig -a ! -d ~/.stdhome.dev ]; then
6
elif [ ! -d ~/.stdhome.orig -a -d ~/.stdhome.dev ]; then
10
if [ -z "$CURRENT" ]; then
11
echo "Can't determine current state" >&2
15
if [ "$CURRENT" == "off" ]; then
16
echo "Dev environment is off" >&2
23
if [ $(( 0 + $1 )) -gt 0 ]; then
28
# check/create reset dir
29
if [ ! -d ~/.stdhome.dev.reset/home -a ! -d ~/.stdhome/home ]; then
30
echo "No ~/.stdhome.dev/home and nothing to copy it from"
33
if [ ! -d ~/.stdhome.dev.reset/home ]; then
34
echo copying dev environment to initial snapshot
35
rm -rf ~/.stdhome.dev.reset
36
cp -a ~/.stdhome ~/.stdhome.dev.reset
40
echo updating repo snapshot
41
cd ~/.stdhome.dev.reset/home
48
cp -a ~/.stdhome{.dev.reset,}
51
if [ -n "$REVNO" ]; then
52
echo applying revno $REVNO
53
/usr/local/bin/stdhome stage-revert
60
echo resetting homedir
61
rm -rf ~/tmp/stdhome-dev
62
cp -a ~/.stdhome/home ~/tmp/stdhome-dev