summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2013-03-09 12:25:15 +0100
committerUlrich Müller <ulm@gentoo.org>2013-03-09 12:25:15 +0100
commite6304fcfd6b0b4fda10289d303b36a7164adf93d (patch)
tree92f32488d52d6f1cf2823f9f3c4ec0cd539bfc59
parentUpdate copyright year. (diff)
downloademacs-tools-e6304fcfd6b0b4fda10289d303b36a7164adf93d.tar.gz
emacs-tools-e6304fcfd6b0b4fda10289d303b36a7164adf93d.tar.bz2
emacs-tools-e6304fcfd6b0b4fda10289d303b36a7164adf93d.zip
Remove unneccesary quoting.
* emacs-updater: Remove unneccesary quoting.
-rw-r--r--ChangeLog4
-rwxr-xr-xemacs-updater26
2 files changed, 17 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 72cb580..a17828a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-03-09 Ulrich Müller <ulm@gentoo.org>
+
+ * emacs-updater: Remove unneccesary quoting.
+
2012-10-11 Ulrich Müller <ulm@gentoo.org>
* Version 1.10 released.
diff --git a/emacs-updater b/emacs-updater
index 21329d0..ac42692 100755
--- a/emacs-updater
+++ b/emacs-updater
@@ -61,7 +61,7 @@ usage() {
X
X -- OPTION... Pass additional options to package manager
EOF
- exit ${1}
+ exit $1
}
version() {
@@ -113,7 +113,7 @@ eval set -- "${OPTIONS}"
while true
do
- case "${1}" in
+ case $1 in
-h|--help) usage 0 ;;
--version) version ;;
-b|--batch) BATCH="true"; shift ;;
@@ -125,7 +125,7 @@ do
-a|--action)
ACTIONS=
for action in ${2/,/ }; do
- case "${action}" in
+ case ${action} in
sitedir|rebuild|all)
ACTIONS="${ACTIONS}${ACTIONS:+ }${action}"
;;
@@ -138,27 +138,27 @@ do
shift 2
;;
-P|--package-manager)
- case "${2}" in
+ case $2 in
auto|automatic) PM_COMMAND=pm_auto ;;
portage|pkgcore|paludis)
- if ! have_${2}; then
- echo "Package manager '${2}' not found!"
+ if ! have_$2; then
+ echo "Package manager '$2' not found!"
exit 22
fi
- PM_COMMAND=pm_${2}
+ PM_COMMAND=pm_$2
;;
*)
- echo "Package manager '${2}' not known!"
+ echo "Package manager '$2' not known!"
usage 21
;;
esac
shift 2
;;
- --package-manager-command) PM_COMMAND=${2}; shift 2 ;;
+ --package-manager-command) PM_COMMAND=$2; shift 2 ;;
--) shift; PM_EXTRAOPTS=( "$@" ); break ;;
*)
# this should not happen; getopt should return bad status
- echo "Invalid option '${1}' given!"
+ echo "Invalid option '$1' given!"
usage 22
;;
esac
@@ -202,7 +202,7 @@ emacs_version() {
# Get Emacs version from byte-compiled file
bytecomp_version() {
- sed -n '/^[^;]/q;s/\.$//;s/.*[Ee]macs version \([0-9].*\)/\1/p' "${1}"
+ sed -n '/^[^;]/q;s/\.$//;s/.*[Ee]macs version \([0-9].*\)/\1/p' "$1"
}
action_sitedir() {
@@ -239,7 +239,7 @@ action_rebuild() {
if [ -z "${MAJOR}" -a "${version%.*}" != "${active%.*}" ] \
|| [ "${version%%.*}" != "${active%%.*}" ] \
- || [ "${1}" = all ]
+ || [ "$1" = all ]
then
echo "Found ${elc##*/} (compiled by Emacs ${version})"
echo "${elc}" >> "${TMPFILE}"
@@ -311,7 +311,7 @@ else
echo -n "${BOLD}Remerge packages?${NORMAL} [${GREEN}Yes${NORMAL}/${RED}No${NORMAL}] "
read choice
echo
- case "${choice}" in
+ case ${choice} in
y*|Y*|"") ;;
*) warning "Quitting."; exit 10 ;;
esac