scripts/*: Declare several constant variables read-only
Be more semantically accurate and avoid accidental overwriting of some configuration variables that are considered to be constant. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
a3a75e0a41
commit
0e4946d559
6 changed files with 10 additions and 10 deletions
|
@ -37,10 +37,10 @@ export TEXTDOMAINDIR='@localedir@'
|
||||||
# file -i does not work on Mac OSX unless legacy mode is set
|
# file -i does not work on Mac OSX unless legacy mode is set
|
||||||
export COMMAND_MODE='legacy'
|
export COMMAND_MODE='legacy'
|
||||||
|
|
||||||
myver='@PACKAGE_VERSION@'
|
declare -r myver='@PACKAGE_VERSION@'
|
||||||
confdir='@sysconfdir@'
|
declare -r confdir='@sysconfdir@'
|
||||||
BUILDSCRIPT='@BUILDSCRIPT@'
|
declare -r BUILDSCRIPT='@BUILDSCRIPT@'
|
||||||
startdir="$PWD"
|
declare -r startdir="$PWD"
|
||||||
|
|
||||||
packaging_options=('strip' 'docs' 'libtool' 'emptydirs' 'zipman' 'purge' 'upx')
|
packaging_options=('strip' 'docs' 'libtool' 'emptydirs' 'zipman' 'purge' 'upx')
|
||||||
other_options=('ccache' 'distcc' 'buildflags' 'makeflags')
|
other_options=('ccache' 'distcc' 'buildflags' 'makeflags')
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
export TEXTDOMAIN='pacman-scripts'
|
export TEXTDOMAIN='pacman-scripts'
|
||||||
export TEXTDOMAINDIR='@localedir@'
|
export TEXTDOMAINDIR='@localedir@'
|
||||||
|
|
||||||
myver='@PACKAGE_VERSION@'
|
declare -r myver='@PACKAGE_VERSION@'
|
||||||
|
|
||||||
eval $(awk '/DBPath/ {print $1$2$3}' @sysconfdir@/pacman.conf)
|
eval $(awk '/DBPath/ {print $1$2$3}' @sysconfdir@/pacman.conf)
|
||||||
dbroot="${DBPath:-@localstatedir@/lib/pacman/}"
|
dbroot="${DBPath:-@localstatedir@/lib/pacman/}"
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
export TEXTDOMAIN='pacman-scripts'
|
export TEXTDOMAIN='pacman-scripts'
|
||||||
export TEXTDOMAINDIR='@localedir@'
|
export TEXTDOMAINDIR='@localedir@'
|
||||||
|
|
||||||
myver="@PACKAGE_VERSION@"
|
declare -r myver="@PACKAGE_VERSION@"
|
||||||
|
|
||||||
# Options
|
# Options
|
||||||
ADD=0
|
ADD=0
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
export TEXTDOMAIN='pacman-scripts'
|
export TEXTDOMAIN='pacman-scripts'
|
||||||
export TEXTDOMAINDIR='@localedir@'
|
export TEXTDOMAINDIR='@localedir@'
|
||||||
|
|
||||||
myver='@PACKAGE_VERSION@'
|
declare -r myver='@PACKAGE_VERSION@'
|
||||||
|
|
||||||
eval $(awk '/DBPath/ {print $1$2$3}' @sysconfdir@/pacman.conf)
|
eval $(awk '/DBPath/ {print $1$2$3}' @sysconfdir@/pacman.conf)
|
||||||
dbroot="${DBPath:-@localstatedir@/lib/pacman/}"
|
dbroot="${DBPath:-@localstatedir@/lib/pacman/}"
|
||||||
|
|
|
@ -26,7 +26,7 @@ set -o errexit
|
||||||
export TEXTDOMAIN='pacman-scripts'
|
export TEXTDOMAIN='pacman-scripts'
|
||||||
export TEXTDOMAINDIR='@localedir@'
|
export TEXTDOMAINDIR='@localedir@'
|
||||||
|
|
||||||
myver='@PACKAGE_VERSION@'
|
declare -r myver='@PACKAGE_VERSION@'
|
||||||
|
|
||||||
QUIET=0
|
QUIET=0
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,8 @@ shopt -s extglob
|
||||||
export TEXTDOMAIN='pacman-scripts'
|
export TEXTDOMAIN='pacman-scripts'
|
||||||
export TEXTDOMAINDIR='@localedir@'
|
export TEXTDOMAINDIR='@localedir@'
|
||||||
|
|
||||||
myver='@PACKAGE_VERSION@'
|
declare -r myver='@PACKAGE_VERSION@'
|
||||||
confdir='@sysconfdir@'
|
declare -r confdir='@sysconfdir@'
|
||||||
|
|
||||||
QUIET=0
|
QUIET=0
|
||||||
DELTA=0
|
DELTA=0
|
||||||
|
|
Loading…
Add table
Reference in a new issue