ttomb-open fix awk for name containing paths - tomb - the crypto undertaker
HTML git clone git://parazyd.org/tomb.git
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 6bb655df0bb1bb3e4f19a27de88a79bdac1ab5b7
DIR parent 75497a238233e5dc96e7b3def7c77e849723135c
HTML Author: boyska <piuttosto@logorroici.org>
Date: Mon, 3 Sep 2012 13:03:20 +0200
ttomb-open fix awk for name containing paths
Diffstat:
M src/tomb-open | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
DIR diff --git a/src/tomb-open b/src/tomb-open
t@@ -155,8 +155,9 @@ launch_status() {
if [ $DISPLAY ]; then
tombname=${1}
- tombmap=`mount -l | awk "/\[${tombname}\]$/"' { print $1 } '`
- tombmount=`mount -l | awk "/\[${tombname}\]$/"' { print $3 } '`
+ tombbase=`basename $tombname`
+ tombmap=`mount -l | awk "/\[${tombbase}\]\$/"' { print $1 } '`
+ tombmount=`mount -l | awk "/\[${tombbase}\]\$/"' { print $3 } '`
if [ -x ./tomb-status ]; then # launch from build dir
./tomb-status $tombmap $tombname $tombmount &!
else