mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +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
|
COUNT=1
|
||||||
TITLE=""
|
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
|
while true ; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h|-help|--help)
|
-h|-help|--help)
|
||||||
@ -15,6 +30,8 @@ while true ; do
|
|||||||
echo " single shoot."
|
echo " single shoot."
|
||||||
echo " -l|-last last flash card in set, run"
|
echo " -l|-last last flash card in set, run"
|
||||||
echo " process-archive.sh after copying."
|
echo " process-archive.sh after copying."
|
||||||
|
echo " -b|-base the base dir to look for drives in"
|
||||||
|
echo " default: $BASE"
|
||||||
echo
|
echo
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
@ -31,6 +48,10 @@ while true ; do
|
|||||||
LAST=1
|
LAST=1
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
-b|-base|--base)
|
||||||
|
BASE=1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
@ -50,9 +71,9 @@ while true ; do
|
|||||||
echo "0) Multi flash card mode is `[[ $MULTI ]] && echo "on" || echo "off"`"
|
echo "0) Multi flash card mode is `[[ $MULTI ]] && echo "on" || echo "off"`"
|
||||||
echo "1) Directoy description is: \"$TITLE\"."
|
echo "1) Directoy description is: \"$TITLE\"."
|
||||||
if [[ ! $DRIVE ]] ; then
|
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
|
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}"
|
echo "Enter) copy drive ${DRIVE}"
|
||||||
fi
|
fi
|
||||||
echo "2) build."
|
echo "2) build."
|
||||||
@ -118,9 +139,8 @@ while true ; do
|
|||||||
|
|
||||||
mkdir -vp "$DIR"
|
mkdir -vp "$DIR"
|
||||||
|
|
||||||
|
|
||||||
echo "Copying files from $1..."
|
echo "Copying files from $1..."
|
||||||
cp -Rpfv /mnt/${DRIVE}/* "$DIR"
|
cp -Rpfv ${BASE}/${DRIVE}/* "$DIR"
|
||||||
echo "Copying files: done."
|
echo "Copying files: done."
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user