diff options
author | David Timber <mieabby@gmail.com> | 2020-01-01 09:50:34 +1100 |
---|---|---|
committer | David Timber <mieabby@gmail.com> | 2020-01-01 09:50:34 +1100 |
commit | ed809a51fdd1c313cd256301ef6f7211e8394cb1 (patch) | |
tree | 81a3054ce0d42976f80c973e2b6ebf9c1b8b7476 /scripts | |
parent | 6e456edb2757cf9d28d306afb836aa16780fb912 (diff) |
checkpoint
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build-all.sh | 11 | ||||
-rwxr-xr-x | scripts/test_bin-archive.sh | 10 |
2 files changed, 11 insertions, 10 deletions
diff --git a/scripts/build-all.sh b/scripts/build-all.sh index 909db75..e24cf5b 100755 --- a/scripts/build-all.sh +++ b/scripts/build-all.sh @@ -42,9 +42,9 @@ PROONE_PREFIX="builds" PROONE_BIN="$PROONE_PREFIX/bin" PROONE_TOOLS="$PROONE_PREFIX/tools" export PROONE_BIN_PREFIX="$PROONE_BIN/proone" -PROONE_PACKER="$PROONE_TOOLS/proone-packer" -PROONE_UNPACKER="$PROONE_TOOLS/proone-unpacker" -PROONE_BIN_ARCHIVE="$PROONE_PREFIX/bin-archive.zz.base64" +PROONE_PACKER="$PROONE_TOOLS/proone-pack" +PROONE_UNPACKER="$PROONE_TOOLS/proone-unpack" +PROONE_BIN_ARCHIVE="$PROONE_PREFIX/bin-archive" rm -rf "$PROONE_PREFIX" && mkdir "$PROONE_PREFIX" "$PROONE_BIN" "$PROONE_TOOLS" if [ $? -ne 0 ] ; then @@ -54,7 +54,7 @@ fi make distclean # native build for tools -./configure && make -j$(nproc) && cp -a src/proone-packer "$PROONE_PACKER" && cp -a src/proone-unpacker "$PROONE_UNPACKER" && make distclean +./configure && make -j$(nproc) && cp -a src/proone-pack "$PROONE_PACKER" && cp -a src/proone-unpack "$PROONE_UNPACKER" && make distclean if [ $? -ne 0 ]; then exit $? fi @@ -68,7 +68,8 @@ for (( i = 0; i < ARR_SIZE; i += 1 )); do done # pack -"$PROONE_PACKER" "$PROONE_BIN_PREFIX."* | pigz -z - | base64 > "$PROONE_BIN_ARCHIVE" +echo "" > "$PROONE_BIN_ARCHIVE" # don't include the credential line +"$PROONE_PACKER" "$PROONE_BIN_PREFIX."* | pigz -z - | base64 >> "$PROONE_BIN_ARCHIVE" if [ $? -ne 0 ]; then exit $? fi diff --git a/scripts/test_bin-archive.sh b/scripts/test_bin-archive.sh index c4e1d93..0506102 100755 --- a/scripts/test_bin-archive.sh +++ b/scripts/test_bin-archive.sh @@ -16,10 +16,10 @@ if [ -z "$LISTARCH" ]; then LISTARCH="../src/proone-list-arch" fi if [ -z "$PACKER" ]; then - PACKER="../src/proone-packer" + PACKER="../src/proone-pack" fi if [ -z "$UNPACKER" ]; then - UNPACKER="../src/proone-unpacker" + UNPACKER="../src/proone-unpack" fi ARCH_ARR=(`"$LISTARCH"`) @@ -41,12 +41,12 @@ for arch in ${ARCH_ARR[@]}; do fi done -"$PACKER" "$BIN_PACK_DIR/$BIN_PREFIX."* | pigz -z - | base64 > "$TEST_DIR/$BIN_ARCHIVE_PREFIX.zz.b64" +"$PACKER" "$BIN_PACK_DIR/$BIN_PREFIX."* | pigz -z - | base64 > "$TEST_DIR/$BIN_ARCHIVE_PREFIX" if [ $? -ne 0 ]; then exit 2; fi -"$UNPACKER" "$BIN_UNPACK_DIR/$BIN_PREFIX" < "$TEST_DIR/$BIN_ARCHIVE_PREFIX.zz.b64" +"$UNPACKER" "$BIN_UNPACK_DIR/$BIN_PREFIX" < "$TEST_DIR/$BIN_ARCHIVE_PREFIX" if [ $? -ne 0 ]; then exit 2; fi @@ -58,6 +58,6 @@ for arch in ${ARCH_ARR[@]}; do fi done -echo $(du -bs "$BIN_PACK_DIR" | awk '{print $1;}') $(wc -c "$TEST_DIR/$BIN_ARCHIVE_PREFIX.zz.b64" | awk '{print $1;}') >> "$SIZE_LOG" +echo $(du -bs "$BIN_PACK_DIR" | awk '{print $1;}') $(wc -c "$TEST_DIR/$BIN_ARCHIVE_PREFIX" | awk '{print $1;}') >> "$SIZE_LOG" exit 0 |