From 4656e61388b0ad12190cab81cfde40643c21ece2 Mon Sep 17 00:00:00 2001 From: Slaven Rezic Date: Sat, 17 Feb 2018 10:41:11 +0100 Subject: [PATCH] document another GPS::BBBikeGPS::MountedDevice usage --- GPS/BBBikeGPS/MountedDevice.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/GPS/BBBikeGPS/MountedDevice.pm b/GPS/BBBikeGPS/MountedDevice.pm index 201d62895d..8420d90c58 100644 --- a/GPS/BBBikeGPS/MountedDevice.pm +++ b/GPS/BBBikeGPS/MountedDevice.pm @@ -664,6 +664,10 @@ Or for the first partition on a card: perl -w -Ilib -MGPS::BBBikeGPS::MountedDevice -e 'GPS::BBBikeGPS::MountedDevice->maybe_mount(sub { my $dir = shift; system("ls", "-al", $dir); 1 }, garmin_disk_type => "card")' +Or starting a shell in the mounted directory: + + perl -w -Ilib -MGPS::BBBikeGPS::MountedDevice -e 'GPS::BBBikeGPS::MountedDevice->maybe_mount(sub { my $dir = shift; chdir $dir; system($ENV{SHELL}); chdir "/"; 1 })' + The mount rule is: if the device is already mounted, then don't unmount at the end. If the device is not mounted, then unmount after the callback.