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..."
54 **************************************************************************
56 Where would you like to install the filer?
57 Normally, you should choose (1) if you have root access, or (2) if not.
60 2) Inside my home directory
62 4) Specify paths manually
72 1) APPDIR
=/usr
/local
/apps
75 CHOICESDIR
=/usr
/local
/share
/Choices
76 MIMEDIR
=/usr
/local
/share
/mime
/mime-info
78 2) APPDIR
=${HOME}/Apps
80 CHOICESDIR
=${HOME}/Choices
81 MIMEDIR
=${HOME}/.mime
/mime-info
82 if [ ! -d ${HOME}/man
]; then
91 CHOICESDIR
=/usr
/share
/Choices
92 MIMEDIR
=/usr
/local
/mime
/mime-info
94 4) echo "Where should the ROX-Filer application go?"
95 get_dir
"/usr/local/apps"
98 echo "Where should the launcher script go?"
99 get_dir
"/usr/local/bin"
102 echo "Where should the manual page go?"
103 get_dir
"/usr/local/man"
106 echo "Where should the default icons and run actions go?"
107 get_dir
"/usr/local/share/Choices"
110 echo "Where should the MIME info file go?"
111 get_dir
"/usr/local/share/mime/mime-info"
114 *) die
"Invalid choice!";;
117 MIMEINFO
="${MIMEDIR}/rox.mimeinfo"
120 The application directory will be:
123 The launcher script will be:
126 Icons and run actions will be in:
129 MIME-info rules will be:
133 if [ -n "$MANDIR" ]; then
134 echo "The manual pages will be:"
135 echo " $MANDIR/man1/rox.1"
136 echo " $MANDIR/man1/ROX-Filer.1"
138 echo "The manual page will not be installed."
146 if [ -n "$MANDIR" ]; then
147 echo "Installing manpage..."
150 cp rox
.1 "$MANDIR/man1/rox.1" || die
"Can't install manpage!"
151 rm -f "$MANDIR/man1/ROX-Filer.1" || die
"Can't install manpage!"
152 ln -s "$MANDIR/man1/rox.1" "$MANDIR/man1/ROX-Filer.1" || die
"Can't install manpage!"
155 echo "Installing icons (existing icons will not be replaced)..."
156 endir
"$CHOICESDIR/MIME-icons"
157 endir
"$CHOICESDIR/MIME-types"
158 cd Choices || die
"Choices missing"
159 for file in MIME-
*/*; do
160 if [ -f "$file" ]; then
161 dest
="$CHOICESDIR/$file"
162 if [ ! -f "$dest" ]; then
163 if [ ! -d "$dest" ]; then
164 echo Install
$file as
$dest
173 cp rox.mimeinfo
"$MIMEINFO" || die
"Failed to create $MIMEINFO"
175 echo "Installing application..."
178 (cd ROX-Filer
/src
; make clean
) > /dev
/null
179 if [ -d "$APPDIR/ROX-Filer" ]; then
180 echo "ROX-Filer is already installed - delete the existing"
184 rm -rf "$APPDIR/ROX-Filer"
186 cp -r ROX-Filer
"$APPDIR"
188 echo "Installing launcher script..."
191 cat > "$BINDIR/rox" << EOF
193 exec $APPDIR/ROX-Filer/AppRun "\$@"
195 [ $?
-eq 0 ] || die
"Failed to install 'rox' script"
196 chmod a
+x
"$BINDIR/rox"
200 Script installed. You can run the filer by simply typing 'rox'
201 Make sure that $BINDIR is in your PATH though - if it isn't then
206 ****************************
207 *** Now read the manual! ***
208 ****************************
210 Run ROX and click on the information icon on the toolbar: