Sync amd64 and x86 base and experimental scripts. Add a few missing popd calls to base scripts.

Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto@gentoo.org>
This commit is contained in:
Jorge Manuel B. S. Vicetto (jmbsvicetto) 2017-12-27 01:54:39 -01:00
parent 0c3d971bfb
commit 93bc214182
4 changed files with 93 additions and 39 deletions

View file

@ -55,32 +55,51 @@ pre_build() {
}
post_build() {
cmd=(
rsync
-e 'ssh -i /root/.ssh/id_rsa'
-a
--omit-dir-times
--delay-updates
)
case $HOSTNAME in
nightheron)
DEST_DEFAULT=${BUILD_DESTDIR_BASE}
DEST_HARDENED=${BUILD_DESTDIR_BASE}/hardened
;;
*)
DEST_DEFAULT=${ARCH}@nightheron.gentoo.org:${BUILD_DESTDIR_BASE}
DEST_HARDENED=${ARCH}@nightheron.gentoo.org:${BUILD_DESTDIR_BASE}/hardened
;;
esac
pushd ${BUILD_SRCDIR_BASE}/default >/dev/null
mkdir -p ${BUILD_DESTDIR_BASE}/default/${DATESTAMP}
for file in $(ls stage{3,4}*${DATESTAMP}*${EXTENSIONS} ); do
mkdir -p ${TMPDIR}/empty
"${cmd[@]}" ${TMPDIR}/empty ${DEST_DEFAULT}
for file in $(ls stage{3,4}*{${DATESTAMP},${TIMESTAMP}}*${EXTENSIONS} ); do
if [ -f $file ]; then
cp $file* ${BUILD_DESTDIR_BASE}/default/${DATESTAMP}
"${cmd[@]}" ${file}* ${DEST_DEFAULT}
fi
done
if [ -f *${DATESTAMP}*.iso ]; then
cp *${DATESTAMP}*.iso* ${BUILD_DESTDIR_BASE}/default/${DATESTAMP}
"${cmd[@]}" *${DATESTAMP}*.iso* ${DEST_DEFAULT}
elif [ -f *${TIMESTAMP}*.iso ]; then
"${cmd[@]}" *${TIMESTAMP}*.iso* ${DEST_DEFAULT}
fi
popd >/dev/null
pushd ${BUILD_SRCDIR_BASE}/hardened >/dev/null
mkdir -p ${BUILD_DESTDIR_BASE}/hardened/${DATESTAMP}
for file in $(ls stage{3,4}*${DATESTAMP}*${EXTENSIONS} ); do
"${cmd[@]}" ${TMPDIR}/empty ${DEST_HARDENED}
for file in $(ls stage{3,4}*{${DATESTAMP},${TIMESTAMP}}*${EXTENSIONS} ); do
if [ -f $file ]; then
cp $file* ${BUILD_DESTDIR_BASE}/hardened/${DATESTAMP}
"${cmd[@]}" $file* ${DEST_HARDENED}
fi
done
if [ -f *${DATESTAMP}*.iso ]; then
cp *${DATESTAMP}*.iso* ${BUILD_DESTDIR_BASE}/hardened/${DATESTAMP}
"${cmd[@]}" *${DATESTAMP}*.iso* ${DEST_HARDEND}
elif [ -f *${TIMESTAMP}*.iso ]; then
"${cmd[@]}" *${TIMESTAMP}*.iso* ${DEST_HARDENED}
fi
popd >/dev/null
}
# vim:ft=sh: