summaryrefslogtreecommitdiff
path: root/misc/drivers/rtl8187x/INSTALL.sh
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-25 14:51:44 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-25 14:51:44 +0000
commitf185bb36f26fe0e808048e5f2f3a8a3eda46d0c7 (patch)
tree449db287acefaf8aa436b8dd362beb4bed1b9f74 /misc/drivers/rtl8187x/INSTALL.sh
parent048de7cf3c1d0a20adb148aaa1ff3bc299858ca3 (diff)
downloadnuttx-f185bb36f26fe0e808048e5f2f3a8a3eda46d0c7.tar.gz
nuttx-f185bb36f26fe0e808048e5f2f3a8a3eda46d0c7.tar.bz2
nuttx-f185bb36f26fe0e808048e5f2f3a8a3eda46d0c7.zip
RTL8187 I/O routines
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3414 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'misc/drivers/rtl8187x/INSTALL.sh')
-rwxr-xr-xmisc/drivers/rtl8187x/INSTALL.sh18
1 files changed, 14 insertions, 4 deletions
diff --git a/misc/drivers/rtl8187x/INSTALL.sh b/misc/drivers/rtl8187x/INSTALL.sh
index 5e727be42..64b9fd1c6 100755
--- a/misc/drivers/rtl8187x/INSTALL.sh
+++ b/misc/drivers/rtl8187x/INSTALL.sh
@@ -44,16 +44,20 @@ dest="drivers/usbhost"
# Parse command arguments
-usage="USAGE: $0 [-d|h] -t <driver-dir> -n <nuttx-dir>"
+usage="USAGE: $0 [-d|f|h] -t <driver-dir> -n <nuttx-dir>"
unset topdir
unset nuttxdir
+unset force
while [ ! -z "$1" ]; do
case "$1" in
-d )
set -x
;;
+ -f )
+ force=y
+ ;;
-t )
shift
topdir=$1
@@ -115,9 +119,15 @@ for file in ${files}; do
fi
if [ -f ${nuttxdir}/${dest}/${file} ]; then
echo "Driver file ${nuttxdir}/${dest}/${file} already exists"
- echo "Please remove that file and re-start the installation"
- exit 8
+ if [ "X${force}" = "Xy" ]; then
+ echo "Removing old file ${nuttxdir}/${dest}/${file}"
+ rm -f ${nuttxdir}/${dest}/${file} || \
+ { echo "ERROR: failed to remove ${nuttxdir}/${dest}/${file}"; exit 8; }
+ else
+ echo "Please remove that file and re-start the installation"
+ exit 8
+ fi
fi
cp ${topdir}/${file} ${nuttxdir}/${dest}/${file} || \
{ echo "ERROR: failed to copy ${topdir}/${file} to ${nuttxdir}/${dest}/${file}"; exit 9; }
-done \ No newline at end of file
+done