Переглянути джерело

Avoid escaped quotes by using $() instead of backticks

The escaped quotes mess up syntax highlighting.
Guillem Jover 19 роки тому
батько
коміт
577eba0c5b
3 змінених файлів з 11 додано та 5 видалено
  1. 6 0
      ChangeLog
  2. 4 4
      scripts/dpkg-buildpackage.sh
  3. 1 1
      scripts/dpkg-name.sh

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+2007-09-06  Guillem Jover  <guillem@debian.org>
+
+	* scripts/dpkg-name.sh: Avoid escaped quotes messing with syntax
+	highlighting by using $() instead of backticks.
+	* scripts/dpkg-buildpackage.sh: Likewise.
+
 2007-09-06  Guillem Jover  <guillem@debian.org>
 
 	* scripts/dpkg-genchanges.pl ($host_arch): Do not declare as 'our'.

+ 4 - 4
scripts/dpkg-buildpackage.sh

@@ -4,7 +4,7 @@ set -e
 
 version="1.10.10"; # This line modified by Makefile
 
-progname="`basename \"$0\"`"
+progname="$(basename "$0")"
 
 showversion () {
 	echo "Debian $progname version $version."
@@ -86,7 +86,7 @@ admindir=''
 
 while [ $# != 0 ]
 do
-	value="`echo x\"$1\" | sed -e 's/x--.*=//;s/^x-.//'`"
+	value="$(echo x"$1" | sed -e 's/x--.*=//;s/^x-.//')"
 	case "$1" in
 	-h|--help)
 		usage; exit 0 ;;
@@ -160,7 +160,7 @@ mustsetvar () {
 }
 
 curd="`pwd`"
-dirn="`basename \"$curd\"`"
+dirn="$(basename "$curd")"
 mustsetvar package "`dpkg-parsechangelog | sed -n 's/^Source: //p'`" "source package is"
 mustsetvar changesversion "`dpkg-parsechangelog | sed -n 's/^Version: //p'`" "source version is"
 if [ -n "$changedby" ]; then maintainer="$changedby";
@@ -173,7 +173,7 @@ if [ x$sourceonly = x ]; then
 else
 	arch=source
 fi
-mustsetvar sversion "`echo \"$changesversion\" | perl -pe 's/^\d+://'`" "source version without epoch"
+mustsetvar sversion "$(echo "$changesversion" | perl -pe 's/^\d+://')" "source version without epoch"
 pv="${package}_${sversion}"
 pva="${package}_${sversion}_${arch}"
 

+ 1 - 1
scripts/dpkg-name.sh

@@ -3,7 +3,7 @@
 set -e
 
 # Time-stamp: <96/05/03 13:59:41 root>
-prog="`basename \"${0}\"`"
+prog="$(basename "${0}")"
 version="1.2.3"; # This line modified by Makefile
 purpose="rename Debian packages to full package names"