From adfce3ef13de2d24d633d1f7408e4dae12e40866 Mon Sep 17 00:00:00 2001 From: Saul Wold Date: Thu, 14 Mar 2019 18:20:25 -0700 Subject: [PATCH] make_stx_mirror_yum_conf: Fix sed statement The appending to repodir was missing () around the LHS reference and give the following error: sed: -e expression #1, char 56: invalid reference \1 on `s' command's RHS Change-Id: Ib7f21a45a9debf42ae8d91be3e8288c7d0b97463 Signed-off-by: Saul Wold --- centos-mirror-tools/make_stx_mirror_yum_conf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/centos-mirror-tools/make_stx_mirror_yum_conf.sh b/centos-mirror-tools/make_stx_mirror_yum_conf.sh index 90f5d387..01f30005 100755 --- a/centos-mirror-tools/make_stx_mirror_yum_conf.sh +++ b/centos-mirror-tools/make_stx_mirror_yum_conf.sh @@ -148,7 +148,7 @@ if grep -q '^reposdir=' $CENGN_YUM_CONF; then # reposdir= already exists, modify it if [ $RETAIN_REPODIR -eq 1 ]; then # Append CENGN_REPOS_DIR - sed "s#^reposdir=.*\$#reposdir=\1 $CENGN_REPOS_DIR#" -i $CENGN_YUM_CONF + sed "s#^reposdir=\(.*\)\$#reposdir=\1 $CENGN_REPOS_DIR#" -i $CENGN_YUM_CONF else # replace with CENGN_REPOS_DIR sed "s#^reposdir=.*\$#reposdir=$CENGN_REPOS_DIR#" -i $CENGN_YUM_CONF