repo.or.cz
/
rover.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Remove some unnecessary parentheses.
[rover.git]
/
rover.sh
blob
33b4107fc6cf5c50dbb20b86f65566d4f5fe77f6
1
#!/bin/sh
2
3
# Based on ranger launcher.
4
#
5
# Usage: ". ./rover.sh [/path/to/rover]"
6
7
tempfile
=
"$(mktemp)"
8
rover
=
"
${1:-rover}
"
9
test -z
"
$1
"
||
shift
10
"
$rover
"
--save-cwd
"
$tempfile
"
"
${@:-$(pwd)}
"
11
returnvalue
=
$?
12
test -f
"
$tempfile
"
&&
13
if
[
"$(cat -- "
$tempfile
")"
!=
"$(echo -n `pwd`)"
];
then
14
cd
"$(cat "
$tempfile
")"
15
fi
16
rm
-f --
"
$tempfile
"
17
return
$returnvalue