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
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
89 if [ ! -d ${HOME}/man
]; then
98 CHOICESDIR
=/usr
/share
/Choices
99 MIMEDIR
=/usr
/local
/mime
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"
121 *) die
"Invalid choice!";;
124 MIMEINFO
="${MIMEDIR}/packages/rox.xml"
127 The application directory will be:
130 The launcher script will be:
133 Icons and run actions will be in:
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 endir
"$MIMEDIR/packages"
190 cp rox.xml
"$MIMEINFO" || die
"Failed to create $MIMEINFO"
191 update-mime-database
"$MIMEDIR" || die
"update-mime-database failed
192 Make sure you have installed the shared MIME database from:
193 http://www.freedesktop.org/standards/shared-mime-info.html"
195 echo "Installing application..."
198 (cd ROX-Filer
/src
; make clean
) > /dev
/null
199 if [ -d "$APPDIR/ROX-Filer" ]; then
200 echo "ROX-Filer is already installed - delete the existing"
204 rm -rf "$APPDIR/ROX-Filer"
206 cp -r ROX-Filer
"$APPDIR"
208 echo "Installing launcher script..."
211 cat > "$BINDIR/rox" << EOF
213 exec $APPDIR/ROX-Filer/AppRun "\$@"
215 [ $?
-eq 0 ] || die
"Failed to install 'rox' script"
216 chmod a
+x
"$BINDIR/rox"
220 Script installed. You can run the filer by simply typing 'rox'
221 Make sure that $BINDIR is in your PATH though - if it isn't then
226 ****************************
227 *** Now read the manual! ***
228 ****************************
230 Run ROX and click on the information icon on the toolbar: