some minor fixes with sh patch

This commit is contained in:
Adam Tkac 2007-05-11 13:47:40 +00:00
parent f0f584259d
commit 5e2a2f649d
2 changed files with 14 additions and 11 deletions

View File

@ -2,7 +2,7 @@
+++ mtools-3.9.10/scripts/amuFormat.sh 2007-05-11 10:46:55.000000000 +0200
@@ -1,4 +1,4 @@
-#!/bin/csh
+#!/bin/sh
+#!/bin/bash
#
# amuFormat.sh Formats various types and sizes of PC-Cards, according to the
# AMU-specification
@ -29,7 +29,7 @@
- echo ""
- exit 0
-endif
+if [[ $# -eq 0 ]] ; then
+if [ $# -eq 0 ] ; then
+ cat <<-EOF
+ Usage: amuFormat.sh <Card Type> <drive>
+ <Card Type> has to be defined in amuFormat.sh itself
@ -42,16 +42,16 @@
echo "Formatting card in slot $2 as $1"
-if ( $1 == "8MBCARD-FW" ) then
+if [[ "x$1" == "x8MBCARD-FW" ]] ; then
+if [ "x$1" == "x8MBCARD-FW" ] ; then
## determine formatting drive
- if ( ($2 == "b:") || ($2 == "B:") ) then
- set fdrive = "f:"
- else if ( ($2 == "c:") || ($2 == "C:" ) ) then
- set fdrive = "g:"
+ if [[ ( "x$2" == "xb:") || ( "x$2" == "xB:") ]] ; then
+ if [ ( "x$2" == "xb:") || ( "x$2" == "xB:") ] ; then
+ fdrive="f:"
+ elif [[ ( "x$2" == "xc:") || ( "x$2" == "xC:" ) ]] ; then
+ elif [ ( "x$2" == "xc:") || ( "x$2" == "xC:" ) ] ; then
+ fdrive="g:"
else
echo "Drive $2 not supported."
@ -69,7 +69,7 @@
+fi
-if ( $1 == "32MBCARD-FW" ) then
+if [[ "x$1" == "x32MBCARD-FW" ]] ; then
+if [ "x$1" == "x32MBCARD-FW" ] ; then
#from amu_toolkit_0_6: mformat -t489 -h4 -c4 -n32 -H32 -r32 -vPC-CARD -M512 -N0000 c:
@ -81,7 +81,7 @@
+fi
-if ( $1 == "64MBCARD-FW" ) then
+if [[ "x$1" == "x64MBCARD-FW" ]] ; then
+if [ "x$1" == "x64MBCARD-FW" ] ; then
echo "***** WARNING: untested on AvHMU, exiting *****"
exit 0
@ -94,7 +94,7 @@
-if ( $1 == "1GBCARD-FW" ) then
+if [[ "x$1" == "x1GBCARD-FW" ]] ; then
+if [ "x$1" == "x1GBCARD-FW" ] ; then
# from amu_toolkit_0_6: mformat -t2327 -h16 -c64 -n63 -H63 -r32 -v AMU-CARD -M512 -N 0000 c:
@ -106,7 +106,7 @@
+fi
-if ( $1 == "64MBCARDSAN" ) then
+if [[ "x$1" == "x64MBCARDSAN" ]] ; then
+if [ "x$1" == "x64MBCARDSAN" ] ; then
# from amu_toolkit_0_6: mformat -t489 -h8 -c4 -n32 -H32 -r32 -v AMU-CARD -M512 -N 0000 c:

View File

@ -1,7 +1,7 @@
Summary: Programs for accessing MS-DOS disks without mounting the disks
Name: mtools
Version: 3.9.10
Release: 5%{?dist}
Release: 6%{?dist}
License: GPL
Group: Applications/System
Source: http://mtools.linux.lu/mtools-%{version}.tar.bz2
@ -36,7 +36,7 @@ Mtools should be installed if you need to use MS-DOS disks
%patch4 -p1 -b .noargs
%patch5 -p1 -b .badc
%patch6 -p1 -b .memset
%patch7 -p1 -b .sh
%patch7 -p1 -b .bash
%build
%configure
@ -72,6 +72,9 @@ fi
%{_infodir}/*
%changelog
* Fri May 11 2007 Adam Tkac <atkac redhat com> 3.9.10-6.fc7
- some minor changes in sh patch (changed sh to bash)
* Fri May 11 2007 Adam Tkac <atkac redhat com> 3.9.10-5.fc7
- patch to #239741 by Matej Cepl <mcepl@redhat.com>
(rewrites /usr/bin/amuFormat.sh to /bin/sh)