3 if [ -n "$CHOICESPATH" ]; then
4 CHOICESPATH
=${HOME}/Choices
:/usr
/local
/share
/Choices
:/usr
/share
/Choices
13 # Create the directory if it doesn't exist. Exit if it can't be created.
15 if [ ! -d "$1" ]; then
16 mkdir
"$1" || die
"Can't create $1 directory!"
20 function confirm_or_die
() {
22 echo -n "[yes/no] >>> "
33 .
/ROX-Filer
/AppRun
--version 2> /dev
/null
36 echo "Filer didn't run... attempting to compile..."
37 .
/ROX-Filer
/AppRun
--compile
39 echo "Filer is already compiled - good"
43 .
/ROX-Filer
/AppRun
--version
45 die
"Filer doesn't work! Giving up..."
51 ROX-Filer comes with some icons and other defaults. These should be
52 installed where it can find them. By default, it looks in
53 \${HOME}/Choices (${HOME}/Choices in your case)
54 /usr/local/share/Choices
56 in that order. You can choose a different search path by setting
57 the CHOICESPATH environment variable before running the filer.
59 Which Choices directory would you like to use? Option (1) is recommended
60 if you have root access; otherwise option (2) is best.
62 1) /usr/local/share/Choices
66 Enter 1, 2, 3 or a path (starting with /):
74 1) CHOICES
=/usr
/local
/share
/Choices
;;
75 2) CHOICES
=${HOME}/Choices
;;
76 3) CHOICES
=/usr
/share
/Choices
;;
78 CHOICESPATH
="${CHOICES}:${CHOICESPATH}"
79 echo "*** NOTE that if you install into a non-standard Choices "
80 echo "*** directory then you must ensure that CHOICESPATH is set "
81 echo "*** correctly before running the filer!"
84 *) die
"Invalid choice!";;
87 echo "Default icons and run actions will be installed into '$CHOICES'."
91 if [ -d "$CHOICES/MIME-icons" ]; then
93 WARNING: You already have a $CHOICES/MIME-icons directory --- any icons you
94 have modified will be overwritten!
102 *) die
"OK, back up the ones you want and try again...";;
106 endir
"$CHOICES/MIME-icons"
107 endir
"$CHOICES/MIME-info"
108 endir
"$CHOICES/MIME-types"
110 echo "Installing icons..."
111 cp Choices
/MIME-icons
/* "$CHOICES/MIME-icons"
113 echo "Installing other files. If you haven't modified these since the "
114 echo "last installation then answer 'yes' to any questions about overwriting "
115 echo "files. Otherwise, you'll have to decide what to do!"
116 cp -i Choices
/MIME-types
/* "$CHOICES/MIME-types"
117 cp -i Choices
/MIME-info
/* "$CHOICES/MIME-info"
119 echo "OK, done that. Next step..."
124 Where would you like to install the filer itself?
125 Normally, you should choose (1) if you have root access, or (2) if not.
130 4) Leave it where it is (it'll still work)
132 Enter 1, 2, 3, 4 or a path (starting with /):
140 1) APPDIR
=/usr
/local
/apps
;;
141 2) APPDIR
=${HOME}/Apps
;;
142 3) APPDIR
=/usr
/apps
;;
144 /*) APPDIR
="$REPLY";;
145 *) die
"Invalid choice!";;
148 if [ -n "$APPDIR" ]; then
151 (cd ROX-Filer
/src
; make clean
) > /dev
/null
152 if [ -e "$APPDIR/ROX-Filer" ]; then
153 echo "ROX-Filer is already installed - delete the existing"
157 rm -rf "$APPDIR/ROX-Filer.old"
159 cp -r ROX-Filer
"$APPDIR"
161 echo "OK, I'll leave it where it is."
165 echo Making ROX-Filer the default handler
for directories...
166 rm "$CHOICES/MIME-types/special_directory" 2> /dev
/null
167 ln -s "$APPDIR/ROX-Filer" "$CHOICES/MIME-types/special_directory"
172 Where would you like to install the 'rox' script, which is used to run
178 4) I don't want to install it
180 Enter 1, 2, 3, 4 or a path (starting with /):
188 1) BINDIR
=/usr
/local
/bin
;;
189 2) BINDIR
=${HOME}/bin
;;
192 /*) BINDIR
="$REPLY";;
193 *) die
"Invalid choice!";;
196 if [ -n "$BINDIR" ]; then
199 cat > "$BINDIR/rox" << EOF
201 exec $APPDIR/ROX-Filer/AppRun "\$@"
203 [ $?
-eq 0 ] || die
"Failed to install 'rox' script"
204 chmod a
+x
"$BINDIR/rox"
207 Script installed. You can run the filer by simply typing 'rox'
208 Make sure that $BINDIR is in your PATH though - if it isn't then
215 OK, skipping installation of the 'rox' script.
216 To run the filer in future, use:
218 \$ $APPDIR/ROX-Filer/AppRun.
225 ****************************
226 *** Now read the manual! ***
227 ****************************
229 Run ROX and click on the information icon on the toolbar: