summaryrefslogtreecommitdiff
path: root/scripts/populate.in
diff options
context:
space:
mode:
authorBryan Hundven <bryanhundven@gmail.com>2015-11-17 10:48:09 (GMT)
committerBryan Hundven <bryanhundven@gmail.com>2015-11-17 10:48:09 (GMT)
commit6f8e89cb5ca061e899bf3feaaf3fecf30d366c3e (patch)
tree9eb19260dd694fa6b4852c46e3f0a93939db9a24 /scripts/populate.in
parent6ac8e31a519f41af7838bb5261e0fe989fb428bd (diff)
consistency: Use exported variables of required tools
We check for apps: * make * sed * grep * awk * libtool/libtoolize * install * patch * and more ...during configure. Our scripts should be consistent about using the variables that define where the found tool was found. Of course, we do hard-link these tools in buildtools, but that should be a backup for the components we are building. Our scripts should always use the tools we find. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
Diffstat (limited to 'scripts/populate.in')
-rw-r--r--scripts/populate.in7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/populate.in b/scripts/populate.in
index 8f476e3..f68acd9 100644
--- a/scripts/populate.in
+++ b/scripts/populate.in
@@ -8,6 +8,7 @@ set -e
install="@@CT_install@@"
grep="@@CT_grep@@"
sed="@@CT_sed@@"
+awk="@@CT_awk@@"
# Detect where the toolchain is:
CT_PREFIX_DIR="$(cd "$(dirname "$0")/.."; pwd)"
@@ -149,8 +150,8 @@ if [ -d "${CT_ROOT_DST_DIR}" ]; then
;;
esac
fi
-src_inode=$(ls -1id "${CT_ROOT_SRC_DIR}/." |awk '{ print $1 }')
-dst_inode=$(ls -1id "${CT_ROOT_DST_DIR}/." 2>/dev/null |awk '{ print $1 }')
+src_inode=$(ls -1id "${CT_ROOT_SRC_DIR}/." |${awk} '{ print $1 }')
+dst_inode=$(ls -1id "${CT_ROOT_DST_DIR}/." 2>/dev/null |${awk} '{ print $1 }')
if [ "${src_inode}" -eq "$((dst_inode+0))" ]; then
printf "$myname: source and destination are the same!\n"
exit 1
@@ -273,7 +274,7 @@ fi
# Create a temporary place where to store... temp files.
rand="$( dd if=/dev/urandom bs=1024 count=1 2>/dev/null \
|md5sum \
- |awk '{ print $1; }'
+ |${awk} '{ print $1; }'
)"
CT_TMP_DIR="${TMPDIR:-/tmp}/populate-${rand}-${$}"
( umask 0077; mkdir "${CT_TMP_DIR}" ) || { printf "Could not create temporary directory\n"; exit 1; }