aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Harrington <kb0iic@berzerkula.org>2021-04-07 08:39:35 -0500
committerWilliam Harrington <kb0iic@berzerkula.org>2021-04-07 08:41:57 -0500
commit42dd5d53ebcef2309345c758250f6c674faa6891 (patch)
tree18c82514222bdf89fac923b61b649a2027c014e7
parentf9a8ed0b161a36594f5a28be09245cf3988fc853 (diff)
Change grep to look for package up until the first comma.
-rw-r--r--packageinstall.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/packageinstall.sh b/packageinstall.sh
index 78e2cdd..df09148 100644
--- a/packageinstall.sh
+++ b/packageinstall.sh
@@ -3,7 +3,7 @@
CHAPTER="$1"
PACKAGE="$2"
-if ! grep -q "^${PACKAGE}" packages.csv; then
+if ! grep -q "^${PACKAGE}," packages.csv; then
printf "%b" " ${IRED}PACKAGE ${IYLW}${PACKAGE} ${IRED}DOES NOT EXIST!${RST}\n"
exit 1
fi
@@ -12,7 +12,7 @@ if [[ -f "${LFS}/sources/chapter${CHAPTER}/${PACKAGE}" ]]; then
printf "%b" "${GRN}Package ${YLW}${PACKAGE} ${GRN}already built and installed${RST}\n"
else
- grep -i "^${PACKAGE}" packages.csv | grep -i -v "\.patch;" | while read -r line; do
+ grep -i "^${PACKAGE}," packages.csv | grep -i -v "\.patch;" | while read -r line; do
VERSION="$(echo "${line}" | cut -d\, -f2)"
URL="$(echo "${line}" | cut -d\, -f3 | sed "s/@/${VERSION}/g")"
CACHEFILE="$(basename "${URL}")"