mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +00:00
added support for OSX and other ways to mount flash drives...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
ec938119cc
commit
957178ea9e
@ -4,6 +4,21 @@ DATE=`date +%Y%m%d`
|
||||
COUNT=1
|
||||
TITLE=""
|
||||
|
||||
# base mount dir...
|
||||
# systems with /mnt
|
||||
if [ -d /mnt ] ; then
|
||||
BASE=/mnt
|
||||
|
||||
# raw Cygwin
|
||||
elif [ -d /cygdrive ] ; then
|
||||
BASE=/cygdrive
|
||||
|
||||
# OSX
|
||||
elif [ -d /Volumes ] ; then
|
||||
BASE=/Volumes
|
||||
fi
|
||||
|
||||
|
||||
while true ; do
|
||||
case "$1" in
|
||||
-h|-help|--help)
|
||||
@ -15,6 +30,8 @@ while true ; do
|
||||
echo " single shoot."
|
||||
echo " -l|-last last flash card in set, run"
|
||||
echo " process-archive.sh after copying."
|
||||
echo " -b|-base the base dir to look for drives in"
|
||||
echo " default: $BASE"
|
||||
echo
|
||||
exit
|
||||
;;
|
||||
@ -31,6 +48,10 @@ while true ; do
|
||||
LAST=1
|
||||
shift
|
||||
;;
|
||||
-b|-base|--base)
|
||||
BASE=1
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
break
|
||||
;;
|
||||
@ -50,9 +71,9 @@ while true ; do
|
||||
echo "0) Multi flash card mode is `[[ $MULTI ]] && echo "on" || echo "off"`"
|
||||
echo "1) Directoy description is: \"$TITLE\"."
|
||||
if [[ ! $DRIVE ]] ; then
|
||||
echo "a-z) type a drive letter and start."
|
||||
echo "a-z|name) type a drive letter or mount name in $BASE and start."
|
||||
else
|
||||
echo "a-z) type a new drive letter and start."
|
||||
echo "a-z|name) type a drive letter or mount name in $BASE and start."
|
||||
echo "Enter) copy drive ${DRIVE}"
|
||||
fi
|
||||
echo "2) build."
|
||||
@ -118,9 +139,8 @@ while true ; do
|
||||
|
||||
mkdir -vp "$DIR"
|
||||
|
||||
|
||||
echo "Copying files from $1..."
|
||||
cp -Rpfv /mnt/${DRIVE}/* "$DIR"
|
||||
cp -Rpfv ${BASE}/${DRIVE}/* "$DIR"
|
||||
echo "Copying files: done."
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user