summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMartin Quinson <mquinson@debian.org>2003-02-14 13:18:11 +0000
committerMartin Quinson <mquinson@debian.org>2003-02-14 13:18:11 +0000
commit79a014a2ea88e84ab0f494efcf7a11b92c4bc6af (patch)
tree67323a104667a1767d61e2412c6ea5a6353ae6d2 /scripts
parentb324e11dcfa120a1cf5827c0c5a96ef28a7743cf (diff)
downloadquilt-79a014a2ea88e84ab0f494efcf7a11b92c4bc6af.tar.gz
Implement i18n, french l10n and bump version number
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/apatch.in20
-rw-r--r--scripts/patchfns.in9
-rwxr-xr-xscripts/rpatch.in22
-rwxr-xr-xscripts/spec2series.in4
4 files changed, 32 insertions, 23 deletions
diff --git a/scripts/apatch.in b/scripts/apatch.in
index 3292e82..e9ea659 100755
--- a/scripts/apatch.in
+++ b/scripts/apatch.in
@@ -19,7 +19,7 @@ fi
usage()
{
- echo "Usage: $0 [-fqv] patchname"
+ echo $"Usage: $0 [-fqv] patchname"
exit 1
}
@@ -37,7 +37,7 @@ rollback_patch()
interrupt()
{
rollback_patch $1
- echo "Interrupted by user; patch $patch was not applied."
+ echo $"Interrupted by user; patch $patch was not applied."
exit 1
}
@@ -48,7 +48,7 @@ apply_patch()
if ! [ -s $patch_file ]
then
- echo "Patch file $patch_file appears to be empty"
+ echo $"Patch file $patch_file appears to be empty"
return 0
fi
@@ -77,14 +77,14 @@ apatch()
trap "" SIGINT
if ! refresh_file_list $patch
then
- echo "refresh_file_list failed"
+ echo $"refresh_file_list failed"
return 1
fi
- echo "Applying $patch"
+ echo $"Applying $patch"
if ! [ -e $pc_file ]
then
- echo "Patch $patch appears to be empty, applied"
+ echo $"Patch $patch appears to be empty, applied"
add_to_db $patch
return 0
fi
@@ -92,7 +92,7 @@ apatch()
status=$?
if [ $status -eq 2 ]
then
- [ -z "$opt_quiet" ] && echo "Recreated file list for $patch"
+ [ -z "$opt_quiet" ] && echo $"Recreated file list for $patch"
elif [ $status -ne 0 ]
then
return 1
@@ -123,11 +123,11 @@ apatch()
rm -f $pc_file~refresh
else
touch $pc_file~refresh
- echo "Applied $patch (forced; needs refresh)"
+ echo $"Applied $patch (forced; needs refresh)"
fi
else
rollback_patch $patch
- echo "Patch $patch does not apply (enforce with -f)"
+ echo $"Patch $patch does not apply (enforce with -f)"
fi
trap - SIGINT
return $status
@@ -178,7 +178,7 @@ patch=$(stripit $1)
top=$(top_patch)
if [ -n "$top" -a -e $(pc_file_name $top)~refresh ]
then
- echo "The topmost patch $top needs to be refreshed first."
+ echo $"The topmost patch $top needs to be refreshed first."
exit 1
fi
diff --git a/scripts/patchfns.in b/scripts/patchfns.in
index 91e3db9..b155903 100644
--- a/scripts/patchfns.in
+++ b/scripts/patchfns.in
@@ -7,6 +7,15 @@
#
# See the COPYING and AUTHORS files for more details.
+# Compat tests
+if [ "$BASH_VERSION" \< "2.04" ] ; then
+ echo "$0: Needs Bash >= 2.04" >&2
+ exit 1
+fi
+
+export TEXTDOMAIN=quilt
+
+
if [ -n "$PATCHSCRIPTS" ]
then
P=$PATCHSCRIPTS/
diff --git a/scripts/rpatch.in b/scripts/rpatch.in
index afdf230..91d01a5 100755
--- a/scripts/rpatch.in
+++ b/scripts/rpatch.in
@@ -19,7 +19,7 @@ fi
usage()
{
- echo "Usage: $0 [-fRq] patchname"
+ echo $"Usage: $0 [-fRq] patchname"
exit 1
}
@@ -41,7 +41,7 @@ verify_removal()
if [ $status -eq 0 ]
then
- echo "Patch does not remove changes:"
+ echo $"Patch does not remove changes:"
fi
@DIFF@ -Nu $DIFF_OPTS $bup $file \
@@ -99,7 +99,7 @@ interrupt()
{
local patch=$1
rollback_patch $patch
- echo "Interrupted by user; patch $patch was not removed."
+ echo $"Interrupted by user; patch $patch was not removed."
exit 1
}
@@ -110,7 +110,7 @@ reverse_patch()
if ! [ -s $patch_file ]
then
- echo "Patch file $patch_file appears to be empty"
+ echo $"Patch file $patch_file appears to be empty"
return 0
fi
@@ -136,7 +136,7 @@ rpatch()
if ! [ -e $pc_file ]
then
- echo "Patch $patch appears to be empty, removed"
+ echo $"Patch $patch appears to be empty, removed"
remove_from_db $patch
return 0
fi
@@ -161,7 +161,7 @@ rpatch()
if ! @LIB@/backup-files $silent_unless_verbose \
-f $pc_file -z ~rpatch
then
- echo "Failed to create temporary files" >&2
+ echo $"Failed to create temporary files" >&2
return 1
fi
@@ -182,7 +182,7 @@ rpatch()
remove_from_db $patch
else
rollback_patch $patch
- echo "Patch $patch does not remove (enforce with -f)"
+ echo $"Patch $patch does not remove (enforce with -f)"
return 1
fi
fi
@@ -191,11 +191,11 @@ rpatch()
local top=$(top_patch) where
if [ -z "$top" ]
then
- where="no patches applied"
+ where=$"no patch applied"
else
- where="now at $top"
+ where=$"now at $top"
fi
- echo "Removed $patch, $where"
+ echo $"Removed $patch, $where"
}
options=`getopt -o fRqvh -- "$@"`
@@ -243,7 +243,7 @@ patch=$(stripit $1)
top=$(top_patch)
if [ -n "$top" -a -e $(pc_file_name $top)~refresh -a -z "$opt_force" ]
then
- echo "The topmost patch $top needs to be refreshed first."
+ echo $"The topmost patch $top needs to be refreshed first."
exit 1
fi
diff --git a/scripts/spec2series.in b/scripts/spec2series.in
index 63aa50b..f43a3fb 100755
--- a/scripts/spec2series.in
+++ b/scripts/spec2series.in
@@ -97,7 +97,7 @@ echo -n "### md5: " >&2
set -- `md5sum < $file`
echo "$1 cat ${file}"
done) > $WORK/md5sum
-echo " done" >&2
+echo $" done" >&2
# prepare rpm dir fixups and hooks
RPM="rpm --rcfile=/usr/lib/rpm/rpmrc:$WORK/rpmrc"
@@ -189,7 +189,7 @@ ln -s patch "$WORK/bin/tar"
echo -n "### rpm: " >&2
touch $WORK/patchlog
$RPM --nodeps --quiet -bp "$specdir/$specfile" </dev/null
-echo " done" >&2
+echo $" done" >&2
# print results saved by the wrapper script
(