16 ?
*) echo "The path must start with a \`/'";;
18 echo OK
, using default value.
24 # Create the directory if it doesn't exist. Exit if it can't be created.
26 if [ ! -d "$1" ]; then
27 mkdir
-p "$1" || die
"Can't create $1 directory!"
33 printf "[yes/no] >>> "
44 echo Testing the filer...
47 die
"Filer doesn't work! Giving up..."
55 **************************************************************************
57 Where would you like to install the filer?
58 Normally, you should choose (1) if you have root access, or (2) if not.
61 2) Inside my home directory
63 4) Specify paths manually
73 1) APPDIR
=/usr
/local
/apps
76 CHOICESDIR
=/usr
/local
/share
/Choices
77 MIMEDIR
=/usr
/local
/share
/mime
/mime-info
79 2) APPDIR
=${HOME}/Apps
81 if [ -n "$CHOICESPATH" ]; then
82 CHOICESDIR
=`echo $CHOICESPATH | sed -e 's/^\([^:]*\).*$/\\1/'`
85 if [ ! -n "$CHOICESDIR" ]; then
86 CHOICESDIR
=${HOME}/Choices
88 MIMEDIR
=${HOME}/.mime
/mime-info
89 if [ ! -d ${HOME}/man
]; then
98 CHOICESDIR
=/usr
/share
/Choices
99 MIMEDIR
=/usr
/local
/mime
/mime-info
101 4) echo "Where should the ROX-Filer application go?"
102 get_dir
"/usr/local/apps"
105 echo "Where should the launcher script go?"
106 get_dir
"/usr/local/bin"
109 echo "Where should the manual page go?"
110 get_dir
"/usr/local/man"
113 echo "Where should the default icons and run actions go?"
114 get_dir
"/usr/local/share/Choices"
117 echo "Where should the MIME info file go?"
118 get_dir
"/usr/local/share/mime/mime-info"
121 *) die
"Invalid choice!";;
124 MIMEINFO
="${MIMEDIR}/rox.mimeinfo"
127 The application directory will be:
130 The launcher script will be:
133 Icons and run actions will be in:
136 MIME-info rules will be:
140 if [ ! -f rox
.1 ]; then
141 echo '*** The ROX-Filer manpage (rox.1) is missing.'
142 echo '*** It can be created from Manual.xml by running'
143 echo "*** 'make' in the ROX-Filer/src/Docs directory."
144 echo '*** The daily CVS snapshots have it ready-built'
149 if [ -n "$MANDIR" ]; then
150 echo "The manual pages will be:"
151 echo " $MANDIR/man1/rox.1"
152 echo " $MANDIR/man1/ROX-Filer.1"
154 echo "The manual page will not be installed."
162 if [ -n "$MANDIR" ]; then
163 echo "Installing manpage..."
166 cp rox
.1 "$MANDIR/man1/rox.1" || die
"Can't install manpage!"
167 rm -f "$MANDIR/man1/ROX-Filer.1" || die
"Can't install manpage!"
168 ln -s "$MANDIR/man1/rox.1" "$MANDIR/man1/ROX-Filer.1" || die
"Can't install manpage!"
171 echo "Installing icons (existing icons will not be replaced)..."
172 endir
"$CHOICESDIR/MIME-icons"
173 endir
"$CHOICESDIR/MIME-types"
174 cd Choices || die
"Choices missing"
175 for file in MIME-
*/*; do
176 if [ -f "$file" ]; then
177 dest
="$CHOICESDIR/$file"
178 if [ ! -f "$dest" ]; then
179 if [ ! -d "$dest" ]; then
180 echo Install
$file as
$dest
189 cp rox.mimeinfo
"$MIMEINFO" || die
"Failed to create $MIMEINFO"
191 echo "Installing application..."
194 (cd ROX-Filer
/src
; make clean
) > /dev
/null
195 if [ -d "$APPDIR/ROX-Filer" ]; then
196 echo "ROX-Filer is already installed - delete the existing"
200 rm -rf "$APPDIR/ROX-Filer"
202 cp -r ROX-Filer
"$APPDIR"
204 echo "Installing launcher script..."
207 cat > "$BINDIR/rox" << EOF
209 exec $APPDIR/ROX-Filer/AppRun "\$@"
211 [ $?
-eq 0 ] || die
"Failed to install 'rox' script"
212 chmod a
+x
"$BINDIR/rox"
216 Script installed. You can run the filer by simply typing 'rox'
217 Make sure that $BINDIR is in your PATH though - if it isn't then
222 ****************************
223 *** Now read the manual! ***
224 ****************************
226 Run ROX and click on the information icon on the toolbar: