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...
45 # Note: must use full path due to bug in xterm
46 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=342782
47 "`pwd`/ROX-Filer/AppRun" -v
49 die
"Filer doesn't work! Giving up..."
57 **************************************************************************
59 Where would you like to install the filer?
60 Normally, you should choose (1) if you have root access, or (2) if not.
63 2) Inside my home directory
65 4) Specify paths manually
68 Enter 1, 2, 3, 4 or 5:
76 1) APPDIR
=/usr
/local
/apps
78 SHAREDIR
=/usr
/local
/share
79 #CHOICESDIR=${SHAREDIR}/Choices
80 XDGDATADIR
=/usr
/local
/share
82 MANDIR
=/usr
/local
/man
# (not under share!)
84 2) APPDIR
=${HOME}/Apps
86 if [ -n "$XDG_DATA_HOME" ]; then
87 SHAREDIR
=${XDG_DATA_HOME}
89 SHAREDIR
=${HOME}/.local
/share
91 if [ -n "$XDG_CONFIG_HOME" ]; then
92 CHOICESDIR
=${XDG_CONFIG_HOME}
94 CHOICESDIR
=${HOME}/.config
98 if [ ! -d "$MANDIR" ]; then
106 MANDIR
=${SHAREDIR}/man
108 4) echo "Where should the ROX-Filer application go?"
109 get_dir
"/usr/local/apps"
112 echo "Where should the launcher script go?"
113 get_dir
"/usr/local/bin"
116 echo "Where should the shared resources (eg, MIME data) go?"
117 get_dir
"/usr/local/share"
120 echo "Where should the default run actions go?"
124 echo "Where should the man pages go?"
125 get_dir
"/usr/local/man"
128 5) echo "What prefix should I use?"
132 SHAREDIR
="$DIR/share"
134 MANDIR
="$DIR/man" # (not under share!)
137 *) die
"Invalid choice!";;
140 MIMEDIR
=${SHAREDIR}/mime
142 MIMEINFO
="${MIMEDIR}/packages/rox.xml"
145 The application directory will be:
148 The launcher script will be:
151 Run actions will be in:
158 if [ ! -f rox
.1 ]; then
159 echo '*** The ROX-Filer manpage (rox.1) is missing.'
160 echo '*** It can be created from Manual.xml by running'
161 echo "*** 'make' in the ROX-Filer/src/Docs directory."
162 echo '*** The daily CVS snapshots have it ready-built'
167 if [ -n "$MANDIR" ]; then
168 echo "The manual pages will be:"
169 echo " $MANDIR/man1/rox.1"
170 echo " $MANDIR/man1/ROX-Filer.1"
172 echo "The manual page will not be installed."
182 if [ -n "$MANDIR" ]; then
183 echo "Installing manpage..."
186 cp rox
.1 "$MANDIR/man1/rox.1" || die
"Can't install manpage!"
187 rm -f "$MANDIR/man1/ROX-Filer.1" || die
"Can't install manpage!"
188 ln -s "$MANDIR/man1/rox.1" "$MANDIR/man1/ROX-Filer.1" || die
"Can't install manpage!"
191 echo "Installing run actions (existing actions will not be replaced)..."
192 endir
"$CHOICESDIR/rox.sourceforge.net/MIME-types"
193 cd Choices || die
"Choices missing"
194 for file in MIME-types
/*; do
195 if [ -f "$file" ]; then
196 dest
="$CHOICESDIR/rox.sourceforge.net/$file"
197 if [ ! -f "$dest" ]; then
198 if [ ! -d "$dest" ]; then
199 echo Install
$file as
$dest
208 endir
"$MIMEDIR/packages"
209 cp rox.xml
"$MIMEINFO" || die
"Failed to create $MIMEINFO"
210 update-mime-database
"$MIMEDIR" || die
"update-mime-database failed
211 Make sure you have installed the shared MIME database from:
212 http://www.freedesktop.org/wiki/Software_2fshared_2dmime_2dinfo"
214 echo "Installing application..."
217 (cd ROX-Filer
/src
&& make clean
) > /dev
/null
2>&1
218 if [ -d "$APPDIR/ROX-Filer" ]; then
219 echo "ROX-Filer is already installed - delete the existing"
223 # Move it away first. If $APPDIR is on an nfs mount then deleting
224 # the binary may fail.
225 old
="$APPDIR/.ROX-Filer.old"
226 if [ -d "$old" ]; then
227 echo "Cleaning up old copy from previous install."
230 mv "$APPDIR/ROX-Filer" "$old"
231 rm -rf "$old" ||
echo "Could not delete old copy.
232 This is usually because it is still executing. When it exits you may like
235 cp -r ROX-Filer
"$APPDIR"
237 echo "Installing launcher script..."
240 cat > "$BINDIR/rox" << EOF
242 exec $APPDIR/ROX-Filer/AppRun "\$@"
244 [ $?
-eq 0 ] || die
"Failed to install 'rox' script"
245 chmod a
+x
"$BINDIR/rox"
249 Script installed. You can run the filer by simply typing 'rox'
250 Make sure that $BINDIR is in your PATH though - if it isn't then
255 ****************************
256 *** Now read the manual! ***
257 ****************************
259 Run ROX and click on the help icon on the toolbar: