summaryrefslogtreecommitdiff
path: root/bin
Unidiff
Diffstat (limited to 'bin') (more/less context) (ignore whitespace changes)
-rwxr-xr-xbin/opie-reorgfiles93
1 files changed, 93 insertions, 0 deletions
diff --git a/bin/opie-reorgfiles b/bin/opie-reorgfiles
new file mode 100755
index 0000000..96b3e29
--- a/dev/null
+++ b/bin/opie-reorgfiles
@@ -0,0 +1,93 @@
1#!/bin/sh
2
3APPS=$HOME/Applications
4DOCS=$HOME/Documents
5
6if [ -d $APPS -a "$1" != "-f" ]
7then
8 echo "You seem to already have a $APPS directory."
9 echo "Assuming it is the Opie Applications directory. Exiting."
10 exit 0
11fi
12
13if [ -d $HOME/Apps ]
14then
15 mv $HOME/Apps $APPS
16else
17 mkdir $APPS
18fi
19
20if [ -f $DOCS/addressbook.xml ]
21then
22 if [ -f $APPS/addressbook/addressbook.xml ]
23 then
24 echo "$DOCS/addressbook.xml conflicts with $APPS/addressbook/addressbook.xml"
25 echo "Moving $DOCS/addressbook.xml to $HOME"
26 mv $DOCS/addressbook.xml $HOME
27 else
28 mkdir $APPS/addressbook
29 mv $DOCS/addressbook.xml $APPS/addressbook
30 fi
31fi
32
33if [ -f $DOCS/datebooksettings.xml ]
34then
35 echo "$DOCS/datebooksettings.xml is obsolete"
36 echo "Please re-set your datebook preferences"
37 rm $DOCS/datebooksettings.xml
38fi
39
40if [ -f $DOCS/datebook.xml ]
41then
42 mkdir $APPS/databook
43 mv $DOCS/datebook.xml $APPS/databook
44fi
45
46if [ -d $DOCS/qtmail ]
47then
48 mv $DOCS/qtmail $APPS/
49fi
50
51if [ -f $DOCS/todo.xml ]
52then
53 if [ -f $APPS/todolist/todolist.xml ]
54 then
55 mv $DOCS/todo.xml $HOME
56 echo "$DOCS/todo.xml is superceded by $APPS/todolist/todolist.xml"
57 echo "$DOCS/todo.xml has been moved to $HOME"
58 else
59 echo "NOTE: $DOCS/todo.xml is obsolete. It will move to $APPS/todolist/todolist.xml"
60 echo "when next you run the latest ToDo application."
61 fi
62fi
63
64if [ ! -d $APPS/qimpen ]
65then
66 mkdir $APPS/qimpen
67fi
68
69if [ -f $DOCS/asciilower.qpt ]
70then
71 mv $DOCS/asciilower.qpt $APPS/qimpen
72fi
73
74if [ -f $DOCS/asciiupper.qpt ]
75then
76 mv $DOCS/asciiupper.qpt $APPS/qimpen
77fi
78
79if [ -f $DOCS/numeric.qpt ]
80then
81 mv $DOCS/numeric.qpt $APPS/qimpen
82fi
83
84if [ -d "$HOME/.qpe" ]
85then
86 if [ -d "$HOME/Settings" ]
87 then
88 mv $HOME/.qpe/* "$HOME/Settings"
89 rmdir "$HOME/.qpe"
90 else
91 mv $HOME/.qpe "$HOME/Settings"
92 fi
93fi