catalyst-auto: squelch all pushd/popd

Have some sed magic, including a negative match.

git grep -l -e pushd -e popd \
| xargs sed -i -r \
  -e '/(pushd|popd)/{ /null/! { s,$, >/dev/null,g } }'

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
This commit is contained in:
Robin H. Johnson 2016-06-14 18:29:20 -07:00
parent 984255449b
commit e243f99edf
No known key found for this signature in database
GPG key ID: 19395F23C58826C4
18 changed files with 56 additions and 56 deletions

View file

@ -29,13 +29,13 @@ pre_build() {
# Symlink the latest stages3 to build from
for d in ${BUILD_SRCDIR_BASE}/builds/default ; do
pushd $d
pushd $d >/dev/null
for f in $(ls stage3*bz2 | grep -v latest | give_latest_from_dates ) ; do
of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff
of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for $
ln -sf $f $of
done
popd
popd >/dev/null
done
}

View file

@ -51,24 +51,24 @@ give_latest_from_dates() {
}
pre_build() {
pushd ${REPO_DIR}
pushd ${REPO_DIR} >/dev/null
git pull
popd
popd >/dev/null
# Symlink the latest stages3 to build from
for d in ${BUILD_SRCDIR_BASE}/{default,hardened} ; do
pushd $d
pushd $d >/dev/null
for f in $(ls stage3*${EXTENSIONS} | grep -v latest | give_latest_from_dates ) ; do
of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff
of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for 20YYMMDD stuff
ln -sf $f $of
done
popd
popd >/dev/null
done
}
post_build() {
pushd ${BUILD_SRCDIR_BASE}/default
pushd ${BUILD_SRCDIR_BASE}/default >/dev/null
mkdir -p ${BUILD_DESTDIR_BASE}/default/${DATESTAMP}
for file in $(ls stage{3,4}*${DATESTAMP}*${EXTENSIONS} ); do
@ -79,9 +79,9 @@ post_build() {
if [ -f *${DATESTAMP}*.iso ]; then
cp *${DATESTAMP}*.iso* ${BUILD_DESTDIR_BASE}/${TYPE}/${ARCH}/default/${DATESTAMP}
fi
popd
popd >/dev/null
pushd ${BUILD_SRCDIR_BASE}/hardened
pushd ${BUILD_SRCDIR_BASE}/hardened >/dev/null
mkdir -p ${BUILD_DESTDIR_BASE}/hardened/${DATESTAMP}
for file in $(ls stage{3,4}*${DATESTAMP}*${EXTENSIONS} ); do

View file

@ -62,25 +62,25 @@ give_latest_from_dates() {
update_symlinks() {
# Symlink the latest stages3 to build from
for d in ${BUILD_SRCDIR_BASE}/{default,hardened} ; do
pushd $d
pushd $d >/dev/null
for f in $(ls stage3*${EXTENSIONS} | grep -v latest | give_latest_from_dates ) ; do
of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff
of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for 20YYMMDD stuff
ln -sf $f $of
done
popd
popd >/dev/null
done
}
pre_build() {
pushd ${REPO_DIR}
pushd ${REPO_DIR} >/dev/null
git pull
popd
popd >/dev/null
update_symlinks
}
post_build() {
pushd ${BUILD_SRCDIR_BASE}/default
pushd ${BUILD_SRCDIR_BASE}/default >/dev/null
mkdir -p ${BUILD_DESTDIR_BASE}
for file in $(ls stage{3,4}*${DATESTAMP}*${EXTENSIONS} ); do
if [ -f $file ]; then
@ -90,9 +90,9 @@ post_build() {
if [ -f *${DATESTAMP}*.iso ]; then
cp *${DATESTAMP}*.iso* ${BUILD_DESTDIR_BASE}
fi
popd
popd >/dev/null
pushd ${BUILD_SRCDIR_BASE}/hardened
pushd ${BUILD_SRCDIR_BASE}/hardened >/dev/null
mkdir -p ${BUILD_DESTDIR_BASE}/hardened
for file in $(ls stage{3,4}*${DATESTAMP}*${EXTENSIONS} ); do
if [ -f $file ]; then

View file

@ -32,13 +32,13 @@ pre_build() {
# Symlink the latest stages3 to build from
for d in ${BUILD_SRCDIR_BASE}/builds/default ; do
pushd $d
pushd $d >/dev/null
for f in $(ls stage3-${SUBARCH}-*bz2 | grep -v latest | give_latest_from_dates ) ; do
of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff
of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for $
ln -sf $f $of
done
popd
popd >/dev/null
done
}

View file

@ -32,13 +32,13 @@ pre_build() {
# Symlink the latest stages3 to build from
for d in ${BUILD_SRCDIR_BASE}/builds/default ; do
pushd $d
pushd $d >/dev/null
for f in $(ls stage3-${SUBARCH}-*bz2 | grep -v latest | give_latest_from_dates ) ; do
of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff
of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for $
ln -sf $f $of
done
popd
popd >/dev/null
done
}

View file

@ -32,13 +32,13 @@ pre_build() {
# Symlink the latest stages3 to build from
for d in ${BUILD_SRCDIR_BASE}/builds/default ; do
pushd $d
pushd $d >/dev/null
for f in $(ls stage3-${SUBARCH}-*bz2 | grep -v latest | give_latest_from_dates ) ; do
of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff
of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for $
ln -sf $f $of
done
popd
popd >/dev/null
done
}

View file

@ -32,13 +32,13 @@ pre_build() {
# Symlink the latest stages3 to build from
for d in ${BUILD_SRCDIR_BASE}/builds/default ; do
pushd $d
pushd $d >/dev/null
for f in $(ls stage3-${SUBARCH}-*bz2 | grep -v latest | give_latest_from_dates ) ; do
of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff
of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for $
ln -sf $f $of
done
popd
popd >/dev/null
done
}

View file

@ -32,13 +32,13 @@ pre_build() {
# Symlink the latest stages3 to build from
for d in ${BUILD_SRCDIR_BASE}/builds/default ; do
pushd $d
pushd $d >/dev/null
for f in $(ls stage3-${SUBARCH}-*bz2 | grep -v latest | give_latest_from_dates ) ; do
of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff
of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for $
ln -sf $f $of
done
popd
popd >/dev/null
done
}

View file

@ -32,13 +32,13 @@ pre_build() {
# Symlink the latest stages3 to build from
for d in ${BUILD_SRCDIR_BASE}/builds/default ; do
pushd $d
pushd $d >/dev/null
for f in $(ls stage3-${SUBARCH}-*bz2 | grep -v latest | give_latest_from_dates ) ; do
of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff
of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for $
ln -sf $f $of
done
popd
popd >/dev/null
done
}

View file

@ -34,7 +34,7 @@ pre_build() {
# Symlink the latest stages3 to build from
for d in ${BUILD_SRCDIR_BASE}/builds/default ; do
pushd $d
pushd $d >/dev/null
for t in hppa1.1 hppa2.0; do
for f in $(ls stage3-${t}-*bz2 | grep -v latest | give_latest_from_dates ) ; do
of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff
@ -42,7 +42,7 @@ pre_build() {
ln -sf $f $of
done
done
popd
popd >/dev/null
done
}

View file

@ -29,13 +29,13 @@ pre_build() {
# Symlink the latest stages3 to build from
for d in ${BUILD_SRCDIR_BASE}/builds/default ; do
pushd $d
pushd $d >/dev/null
for f in $(ls stage3*bz2 | grep -v latest | give_latest_from_dates ) ; do
of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff
of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for $
ln -sf $f $of
done
popd
popd >/dev/null
done
}

View file

@ -30,13 +30,13 @@ pre_build() {
# Symlink the latest stages3 to build from
for d in ${BUILD_SRCDIR_BASE}/builds/default ; do
pushd $d
pushd $d >/dev/null
for f in $(ls stage3-ppc-*bz2 | grep -v latest | give_latest_from_dates ) ; do
of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff
of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for $
ln -sf $f $of
done
popd
popd >/dev/null
done
}

View file

@ -32,7 +32,7 @@ pre_build() {
# Symlink the latest stages3 to build from
for d in ${BUILD_SRCDIR_BASE}/builds/default ; do
pushd $d
pushd $d >/dev/null
for t in ppc64-64ul ppc64-32ul; do
for f in $(ls stage3-${t}-*bz2 | grep -v latest | give_latest_from_dates ) ; do
of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff
@ -40,7 +40,7 @@ pre_build() {
ln -sf $f $of
done
done
popd
popd >/dev/null
done
}

View file

@ -29,13 +29,13 @@ pre_build() {
# Symlink the latest stages3 to build from
for d in ${BUILD_SRCDIR_BASE}/builds/default ; do
pushd $d
pushd $d >/dev/null
for f in $(ls stage3-${SUBARCH}-*bz2 | grep -v latest | give_latest_from_dates ) ; do
of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff
of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for $
ln -sf $f $of
done
popd
popd >/dev/null
done
}

View file

@ -29,13 +29,13 @@ pre_build() {
# Symlink the latest stages3 to build from
for d in ${BUILD_SRCDIR_BASE}/builds/default ; do
pushd $d
pushd $d >/dev/null
for f in $(ls stage3-${SUBARCH}-*bz2 | grep -v latest | give_latest_from_dates ) ; do
of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff
of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for $
ln -sf $f $of
done
popd
popd >/dev/null
done
}

View file

@ -29,13 +29,13 @@ pre_build() {
# Symlink the latest stages3 to build from
for d in ${BUILD_SRCDIR_BASE}/builds/{default,multilib} ; do
pushd $d
pushd $d >/dev/null
for f in $(ls stage3*bz2 | grep -v latest | give_latest_from_dates ) ; do
of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff
of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for $
ln -sf $f $of
done
popd
popd >/dev/null
done
}

View file

@ -38,24 +38,24 @@ give_latest_from_dates() {
}
pre_build() {
pushd ${REPO_DIR}
pushd ${REPO_DIR} >/dev/null
git pull
popd
popd >/dev/null
# Symlink the latest stages3 to build from
for d in ${BUILD_SRCDIR_BASE}/{default,hardened} ; do
pushd $d
pushd $d >/dev/null
for f in $(ls stage3*${EXTENSIONS} | grep -v latest | give_latest_from_dates ) ; do
of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff
of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for 20YYMMDD stuff
ln -sf $f $of
done
popd
popd >/dev/null
done
}
post_build() {
pushd ${BUILD_SRCDIR_BASE}/default
pushd ${BUILD_SRCDIR_BASE}/default >/dev/null
mkdir -p ${BUILD_DESTDIR_BASE}/default/${DATESTAMP}
for file in $(ls stage{3,4}*${DATESTAMP}*${EXTENSIONS} ); do
@ -67,9 +67,9 @@ post_build() {
if [ -f *${DATESTAMP}*.iso ]; then
cp *${DATESTAMP}*.iso* ${BUILD_DESTDIR_BASE}/default/${DATESTAMP}
fi
popd
popd >/dev/null
pushd ${BUILD_SRCDIR_BASE}/hardened
pushd ${BUILD_SRCDIR_BASE}/hardened >/dev/null
mkdir -p ${BUILD_DESTDIR_BASE}/hardened/${DATESTAMP}
for file in $(ls stage{3,4}*${DATESTAMP}*${EXTENSIONS} ); do

View file

@ -38,24 +38,24 @@ give_latest_from_dates() {
}
pre_build() {
pushd ${REPO_DIR}
pushd ${REPO_DIR} >/dev/null
git pull
popd
popd >/dev/null
# Symlink the latest stages3 to build from
for d in ${BUILD_SRCDIR_BASE}/{default,hardened} ; do
pushd $d
pushd $d >/dev/null
for f in $(ls stage3*${EXTENSIONS} | grep -v latest | give_latest_from_dates ) ; do
of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff
of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for 20YYMMDD stuff
ln -sf $f $of
done
popd
popd >/dev/null
done
}
post_build() {
pushd ${BUILD_SRCDIR_BASE}/default
pushd ${BUILD_SRCDIR_BASE}/default >/dev/null
mkdir -p ${BUILD_DESTDIR_BASE}
for file in $(ls stage{3,4}*${DATESTAMP}*${EXTENSIONS} ); do
if [ -f $file ]; then
@ -65,9 +65,9 @@ post_build() {
if [ -f *${DATESTAMP}*.iso ]; then
cp *${DATESTAMP}*.iso* ${BUILD_DESTDIR_BASE}
fi
popd
popd >/dev/null
pushd ${BUILD_SRCDIR_BASE}/hardened
pushd ${BUILD_SRCDIR_BASE}/hardened >/dev/null
mkdir -p ${BUILD_DESTDIR_BASE}/hardened
for file in $(ls stage{3,4}*${DATESTAMP}*${EXTENSIONS} ); do
if [ -f $file ]; then