Use 2 vars for destinations (one for default and another for hardened).
Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto@gentoo.org>
This commit is contained in:
parent
cb879a382e
commit
3190fadba2
|
@ -92,35 +92,41 @@ post_build() {
|
||||||
--delay-updates
|
--delay-updates
|
||||||
)
|
)
|
||||||
case $HOSTNAME in
|
case $HOSTNAME in
|
||||||
nightheron) DEST=${BUILD_DESTDIR_BASE} ;;
|
nightheron)
|
||||||
*) DEST=${ARCH}@nightheron.gentoo.org:${BUILD_DESTDIR_BASE} ;;
|
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
|
esac
|
||||||
pushd ${BUILD_SRCDIR_BASE}/default >/dev/null
|
pushd ${BUILD_SRCDIR_BASE}/default >/dev/null
|
||||||
mkdir -p ${TMPDIR}/empty
|
mkdir -p ${TMPDIR}/empty
|
||||||
"${cmd[@]}" ${TMPDIR}/empty ${DEST}
|
"${cmd[@]}" ${TMPDIR}/empty ${DEST_DEFAULT}
|
||||||
for file in $(ls stage{3,4}*${DATESTAMP}*${EXTENSIONS} stage{3,4}*${TIMESTAMP}*${EXTENSIONS} ); do
|
for file in $(ls stage{3,4}*${DATESTAMP}*${EXTENSIONS} stage{3,4}*${TIMESTAMP}*${EXTENSIONS} ); do
|
||||||
if [ -f $file ]; then
|
if [ -f $file ]; then
|
||||||
"${cmd[@]}" ${file}* ${DEST}
|
"${cmd[@]}" ${file}* ${DEST_DEFAULT}
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ -f *${DATESTAMP}*.iso ]; then
|
if [ -f *${DATESTAMP}*.iso ]; then
|
||||||
"${cmd[@]}" *${DATESTAMP}*.iso* ${DEST}
|
"${cmd[@]}" *${DATESTAMP}*.iso* ${DEST_DEFAULT}
|
||||||
elif [ -f *${TIMESTAMP}*.iso ]; then
|
elif [ -f *${TIMESTAMP}*.iso ]; then
|
||||||
"${cmd[@]}" *${TIMESTAMP}*.iso* ${DEST}
|
"${cmd[@]}" *${TIMESTAMP}*.iso* ${DEST_DEFAULT}
|
||||||
fi
|
fi
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
|
||||||
pushd ${BUILD_SRCDIR_BASE}/hardened >/dev/null
|
pushd ${BUILD_SRCDIR_BASE}/hardened >/dev/null
|
||||||
"${cmd[@]}" ${TMPDIR}/empty ${DEST}/hardened
|
"${cmd[@]}" ${TMPDIR}/empty ${DEST_HARDENED}
|
||||||
for file in $(ls stage{3,4}*${DATESTAMP}*${EXTENSIONS} stage{3,4}*${TIMESTAMP}*${EXTENSIONS} ); do
|
for file in $(ls stage{3,4}*${DATESTAMP}*${EXTENSIONS} stage{3,4}*${TIMESTAMP}*${EXTENSIONS} ); do
|
||||||
if [ -f $file ]; then
|
if [ -f $file ]; then
|
||||||
"${cmd[@]}" $file* ${DEST}/hardened
|
"${cmd[@]}" $file* ${DEST_HARDENED}
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ -f *${DATESTAMP}*.iso ]; then
|
if [ -f *${DATESTAMP}*.iso ]; then
|
||||||
"${cmd[@]}" *${DATESTAMP}*.iso* ${DEST}/hardened
|
"${cmd[@]}" *${DATESTAMP}*.iso* ${DEST_HARDENED}
|
||||||
elif [ -f *${TIMESTAMP}*.iso ]; then
|
elif [ -f *${TIMESTAMP}*.iso ]; then
|
||||||
"${cmd[@]}" *${TIMESTAMP}*.iso* ${DEST}/hardened
|
"${cmd[@]}" *${TIMESTAMP}*.iso* ${DEST_HARDENED}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,35 +63,41 @@ post_build() {
|
||||||
--delay-updates
|
--delay-updates
|
||||||
)
|
)
|
||||||
case $HOSTNAME in
|
case $HOSTNAME in
|
||||||
nightheron) DEST=${BUILD_DESTDIR_BASE} ;;
|
nightheron)
|
||||||
*) DEST=${ARCH}@nightheron.gentoo.org:${BUILD_DESTDIR_BASE} ;;
|
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
|
esac
|
||||||
pushd ${BUILD_SRCDIR_BASE}/default >/dev/null
|
pushd ${BUILD_SRCDIR_BASE}/default >/dev/null
|
||||||
mkdir -p ${TMPDIR}/empty
|
mkdir -p ${TMPDIR}/empty
|
||||||
"${cmd[@]}" ${TMPDIR}/empty ${DEST}
|
"${cmd[@]}" ${TMPDIR}/empty ${DEST_DEFAULT}
|
||||||
for file in $(ls stage{3,4}*{${DATESTAMP},${TIMESTAMP}}*${EXTENSIONS} ); do
|
for file in $(ls stage{3,4}*{${DATESTAMP},${TIMESTAMP}}*${EXTENSIONS} ); do
|
||||||
if [ -f $file ]; then
|
if [ -f $file ]; then
|
||||||
"${cmd[@]}" ${file}* ${DEST}
|
"${cmd[@]}" ${file}* ${DEST_DEFAULT}
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ -f *${DATESTAMP}*.iso ]; then
|
if [ -f *${DATESTAMP}*.iso ]; then
|
||||||
"${cmd[@]}" *${DATESTAMP}*.iso* ${DEST}
|
"${cmd[@]}" *${DATESTAMP}*.iso* ${DEST_DEFAULT}
|
||||||
elif [ -f *${TIMESTAMP}*.iso ]; then
|
elif [ -f *${TIMESTAMP}*.iso ]; then
|
||||||
"${cmd[@]}" *${TIMESTAMP}*.iso* ${DEST}
|
"${cmd[@]}" *${TIMESTAMP}*.iso* ${DEST_DEFAULT}
|
||||||
fi
|
fi
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
|
||||||
pushd ${BUILD_SRCDIR_BASE}/hardened >/dev/null
|
pushd ${BUILD_SRCDIR_BASE}/hardened >/dev/null
|
||||||
"${cmd[@]}" ${TMPDIR}/empty ${DEST}/hardened
|
"${cmd[@]}" ${TMPDIR}/empty ${DEST_HARDENED}
|
||||||
for file in $(ls stage{3,4}*{${DATESTAMP},${TIMESTAMP}}*${EXTENSIONS} ); do
|
for file in $(ls stage{3,4}*{${DATESTAMP},${TIMESTAMP}}*${EXTENSIONS} ); do
|
||||||
if [ -f $file ]; then
|
if [ -f $file ]; then
|
||||||
"${cmd[@]}" $file* ${DEST}/hardened
|
"${cmd[@]}" $file* ${DEST_HARDENED}
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ -f *${DATESTAMP}*.iso ]; then
|
if [ -f *${DATESTAMP}*.iso ]; then
|
||||||
"${cmd[@]}" *${DATESTAMP}*.iso* ${DEST}/hardened
|
"${cmd[@]}" *${DATESTAMP}*.iso* ${DEST_HARDEND}
|
||||||
elif [ -f *${TIMESTAMP}*.iso ]; then
|
elif [ -f *${TIMESTAMP}*.iso ]; then
|
||||||
"${cmd[@]}" *${TIMESTAMP}*.iso* ${DEST}/hardened
|
"${cmd[@]}" *${TIMESTAMP}*.iso* ${DEST_HARDENED}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue