Minor build script cleanup

This commit is contained in:
takeshix 2020-09-09 11:57:24 +02:00
parent 2ac931cf71
commit 92464c069e
4 changed files with 16 additions and 13 deletions

View file

@ -65,8 +65,8 @@ build_gdb() {
main() {
build_gdb
if [ ! -f "${BUILD_DIRECTORY}/binutils-gdb/gdb/gdb" -o \
! -f "${BUILD_DIRECTORY}/binutils-gdb/gdb/gdbserver/gdbserver" ];then
if [ ! -f "${BUILD_DIRECTORY}/binutils-gdb/gdb/gdb" ] || \
[ ! -f "${BUILD_DIRECTORY}/binutils-gdb/gdb/gdbserver/gdbserver" ];then
echo "[-] Building GDB ${CURRENT_ARCH} failed!"
exit 1
fi

View file

@ -36,9 +36,9 @@ build_nmap() {
main() {
lib_build_openssl
build_nmap
if [ ! -f "${BUILD_DIRECTORY}/nmap/nmap" -o \
! -f "${BUILD_DIRECTORY}/nmap/ncat/ncat" -o \
! -f "${BUILD_DIRECTORY}/nmap/nping/nping" ];then
if [ ! -f "${BUILD_DIRECTORY}/nmap/nmap" ] || \
[ ! -f "${BUILD_DIRECTORY}/nmap/ncat/ncat" ] || \
[ ! -f "${BUILD_DIRECTORY}/nmap/nping/nping" ];then
echo "[-] Building Nmap ${CURRENT_ARCH} failed!"
exit 1
fi
@ -63,7 +63,7 @@ main() {
fi
cd "${BUILD_DIRECTORY}/nmap"
make install
cp -r /usr/local/share/nmap/* $NMAP_DIR
cp -r /usr/local/share/nmap/* "$NMAP_DIR"
echo "[+] Copied data to Nmap data dir"
}

View file

@ -33,8 +33,8 @@ main() {
lib_build_openssl
lib_build_zlib
build_openssh
if [ ! -f "${BUILD_DIRECTORY}/openssh-portable/ssh" -o \
! -f "${BUILD_DIRECTORY}/openssh-portable/sshd" ];then
if [ ! -f "${BUILD_DIRECTORY}/openssh-portable/ssh" ] || \
[ ! -f "${BUILD_DIRECTORY}/openssh-portable/sshd" ];then
echo "[-] Building OpenSSH ${CURRENT_ARCH} failed!"
exit 1
fi
@ -43,7 +43,7 @@ main() {
cp "${BUILD_DIRECTORY}/openssh-portable/sshd" "${OUTPUT_DIRECTORY}/sshd${OPENSSH_VERSION}"
echo "[+] Finished building OpenSSH ${CURRENT_ARCH}"
OPENSSH_VERSION=$(echo $OPENSSH_VERSION | sed 's/-//')
OPENSSH_VERSION=$(echo "$OPENSSH_VERSION" | sed 's/-//')
echo ::set-output name=PACKAGED_NAME::"${OPENSSH_VERSION}"
echo ::set-output name=PACKAGED_NAME_PATH::"/output/*"
}