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
75 SHAREDIR
=/usr
/local
/share
76 CHOICESDIR
=${SHAREDIR}/Choices
77 MANDIR
=/usr
/local
/man
# (not under share!)
79 2) APPDIR
=${HOME}/Apps
81 if [ -n "$CHOICESPATH" ]; then
82 CHOICESDIR
=`echo $CHOICESPATH | sed -e 's/^\([^:]*\).*$/\\1/'`
84 if [ ! -n "$CHOICESDIR" ]; then
85 CHOICESDIR
=${HOME}/Choices
87 if [ -n "$XDG_DATA_HOME" ]; then
88 SHAREDIR
=${XDG_DATA_HOME}
90 SHAREDIR
=${HOME}/.local
/share
93 if [ ! -d "$MANDIR" ]; then
100 CHOICESDIR
=${SHAREDIR}/Choices
101 MANDIR
=${SHAREDIR}/man
103 4) echo "Where should the ROX-Filer application go?"
104 get_dir
"/usr/local/apps"
107 echo "Where should the launcher script go?"
108 get_dir
"/usr/local/bin"
111 echo "Where should the shared resources (eg, MIME data) go?"
112 get_dir
"/usr/local/share"
115 echo "Where should the default run actions go?"
116 get_dir
"$SHAREDIR/Choices"
119 echo "Where should the man pages go?"
120 get_dir
"/usr/local/man"
123 *) die
"Invalid choice!";;
126 MIMEDIR
=${SHAREDIR}/mime
128 MIMEINFO
="${MIMEDIR}/packages/rox.xml"
131 The application directory will be:
134 The launcher script will be:
137 Run actions will be in:
144 if [ ! -f rox
.1 ]; then
145 echo '*** The ROX-Filer manpage (rox.1) is missing.'
146 echo '*** It can be created from Manual.xml by running'
147 echo "*** 'make' in the ROX-Filer/src/Docs directory."
148 echo '*** The daily CVS snapshots have it ready-built'
153 if [ -n "$MANDIR" ]; then
154 echo "The manual pages will be:"
155 echo " $MANDIR/man1/rox.1"
156 echo " $MANDIR/man1/ROX-Filer.1"
158 echo "The manual page will not be installed."
168 if [ -n "$MANDIR" ]; then
169 echo "Installing manpage..."
172 cp rox
.1 "$MANDIR/man1/rox.1" || die
"Can't install manpage!"
173 rm -f "$MANDIR/man1/ROX-Filer.1" || die
"Can't install manpage!"
174 ln -s "$MANDIR/man1/rox.1" "$MANDIR/man1/ROX-Filer.1" || die
"Can't install manpage!"
177 echo "Installing run actions (existing actions will not be replaced)..."
178 endir
"$CHOICESDIR/MIME-types"
179 cd Choices || die
"Choices missing"
180 for file in MIME-types
/*; do
181 if [ -f "$file" ]; then
182 dest
="$CHOICESDIR/$file"
183 if [ ! -f "$dest" ]; then
184 if [ ! -d "$dest" ]; then
185 echo Install
$file as
$dest
194 endir
"$MIMEDIR/packages"
195 cp rox.xml
"$MIMEINFO" || die
"Failed to create $MIMEINFO"
196 update-mime-database
"$MIMEDIR" || die
"update-mime-database failed
197 Make sure you have installed the shared MIME database from:
198 http://www.freedesktop.org/software/shared-mime-info"
200 echo "Installing application..."
203 (cd ROX-Filer
/src
&& make clean
) > /dev
/null
2>&1
204 if [ -d "$APPDIR/ROX-Filer" ]; then
205 echo "ROX-Filer is already installed - delete the existing"
209 rm -rf "$APPDIR/ROX-Filer"
211 cp -r ROX-Filer
"$APPDIR"
213 echo "Installing launcher script..."
216 cat > "$BINDIR/rox" << EOF
218 exec $APPDIR/ROX-Filer/AppRun "\$@"
220 [ $?
-eq 0 ] || die
"Failed to install 'rox' script"
221 chmod a
+x
"$BINDIR/rox"
225 Script installed. You can run the filer by simply typing 'rox'
226 Make sure that $BINDIR is in your PATH though - if it isn't then
231 ****************************
232 *** Now read the manual! ***
233 ****************************
235 Run ROX and click on the help icon on the toolbar: