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!"
22 .
/ROX-Filer
/AppRun
--version 2> /dev
/null
25 echo "Filer didn't run... attempting to compile..."
26 .
/ROX-Filer
/AppRun
--compile
28 echo "Filer is already compiled - good"
32 .
/ROX-Filer
/AppRun
--version
34 die
"Filer doesn't work! Giving up..."
40 ROX-Filer comes with some icons and other defaults. These should be
41 installed where it can find them. By default, it looks in
42 \${HOME}/Choices (${HOME}/Choices in your case)
43 /usr/local/share/Choices
45 in that order. You can choose a different search path by setting
46 the CHOICESPATH environment variable before running the filer.
48 Which Choices directory would you like to use? Option (1) is recommended
49 if you have root access; otherwise option (2) is best.
51 1) /usr/local/share/Choices
55 Enter 1, 2, 3 or a path (starting with /):
63 1) CHOICES
=/usr
/local
/share
/Choices
;;
64 2) CHOICES
=${HOME}/Choices
;;
65 3) CHOICES
=/usr
/share
/Choices
;;
67 CHOICESPATH
="${CHOICES}:${CHOICESPATH}"
68 echo "*** NOTE that if you install into a non-standard Choices "
69 echo "*** directory then you must ensure that CHOICESPATH is set "
70 echo "*** correctly before running the filer!"
73 *) die
"Invalid choice!";;
76 echo "Default icons and run actions will be installed into '$CHOICES'."
80 if [ -d "$CHOICES/MIME-icons" ]; then
82 WARNING: You already have a $CHOICES/MIME-icons directory --- any icons you
83 have modified will be overwritten!
91 *) die
"OK, back up the ones you want and try again...";;
95 echo "Installing icons..."
96 cp -r Choices
/MIME-icons
"$CHOICES"
98 echo "Installing other files. If you haven't modified these since the "
99 echo "last installation then answer 'yes' to any questions about overwriting "
100 echo "files. Otherwise, you'll have to decide what to do!"
101 cp -ri Choices
/MIME-types
"$CHOICES"
102 cp -ri Choices
/MIME-info
"$CHOICES"
104 echo "OK, done that. Next step..."
109 Where would you like to install the filer itself?
110 Normally, you should choose (1) if you have root access, or (2) if not.
115 4) Leave it where it is (it'll still work)
117 Enter 1, 2, 3, 4 or a path (starting with /):
125 1) APPDIR
=/usr
/local
/apps
;;
126 2) APPDIR
=${HOME}/Apps
;;
127 3) APPDIR
=/usr
/apps
;;
129 /*) APPDIR
="$REPLY";;
130 *) die
"Invalid choice!";;
133 if [ -n "$APPDIR" ]; then
136 (cd ROX-Filer
/src
; make clean
) > /dev
/null
137 cp -r ROX-Filer
$APPDIR
139 echo "OK, I'll leave it where it is."
143 echo Making ROX-Filer the default handler
for directories...
144 rm "$CHOICES/MIME-types/special_directory" 2> /dev
/null
145 ln -s "$APPDIR/ROX-Filer" "$CHOICES/MIME-types/special_directory"
150 Where would you like to install the 'rox' script, which is used to open
151 files (and, often, start the filer)?
156 4) I don't want to install it
158 Enter 1, 2, 3, 4 or a path (starting with /):
166 1) BINDIR
=/usr
/local
/bin
;;
167 2) BINDIR
=${HOME}/bin
;;
170 /*) BINDIR
="$REPLY";;
171 *) die
"Invalid choice!";;
174 if [ -n "$BINDIR" ]; then
177 cp rox
"$BINDIR" || die
"Failed to install 'rox' script"
180 Script installed. You can run the filer by simply typing 'rox'
181 Make sure that $BINDIR is in your PATH though - if it isn't then
188 OK, skipping installation of the 'rox' script.
189 To run the filer in future, use:
191 \$ $APPDIR/ROX-Filer/AppRun.
198 ****************************"
199 *** Now read the manual! ***"
200 ****************************"
204 \$ $APPDIR/ROX-Filer/AppRun $APPDIR/ROX-Filer/Help &