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 [ -n "$MANDIR" ]; then
141 echo "The manual pages will be:"
142 echo " $MANDIR/man1/rox.1"
143 echo " $MANDIR/man1/ROX-Filer.1"
145 echo "The manual page will not be installed."
153 if [ -n "$MANDIR" ]; then
154 echo "Installing manpage..."
157 cp rox
.1 "$MANDIR/man1/rox.1" || die
"Can't install manpage!"
158 rm -f "$MANDIR/man1/ROX-Filer.1" || die
"Can't install manpage!"
159 ln -s "$MANDIR/man1/rox.1" "$MANDIR/man1/ROX-Filer.1" || die
"Can't install manpage!"
162 echo "Installing icons (existing icons will not be replaced)..."
163 endir
"$CHOICESDIR/MIME-icons"
164 endir
"$CHOICESDIR/MIME-types"
165 cd Choices || die
"Choices missing"
166 for file in MIME-
*/*; do
167 if [ -f "$file" ]; then
168 dest
="$CHOICESDIR/$file"
169 if [ ! -f "$dest" ]; then
170 if [ ! -d "$dest" ]; then
171 echo Install
$file as
$dest
180 cp rox.mimeinfo
"$MIMEINFO" || die
"Failed to create $MIMEINFO"
182 echo "Installing application..."
185 (cd ROX-Filer
/src
; make clean
) > /dev
/null
186 if [ -d "$APPDIR/ROX-Filer" ]; then
187 echo "ROX-Filer is already installed - delete the existing"
191 rm -rf "$APPDIR/ROX-Filer"
193 cp -r ROX-Filer
"$APPDIR"
195 echo "Installing launcher script..."
198 cat > "$BINDIR/rox" << EOF
200 exec $APPDIR/ROX-Filer/AppRun "\$@"
202 [ $?
-eq 0 ] || die
"Failed to install 'rox' script"
203 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
213 ****************************
214 *** Now read the manual! ***
215 ****************************
217 Run ROX and click on the information icon on the toolbar: