From f23a436b030df08831925768f4b3c3d6e455d8da Mon Sep 17 00:00:00 2001 From: dmacias72 Date: Sun, 9 Apr 2017 15:56:19 -0600 Subject: [PATCH] merge into a single script --- source/NerdPack/pkg_build.sh | 37 ------------------------------------ 1 file changed, 37 deletions(-) delete mode 100755 source/NerdPack/pkg_build.sh diff --git a/source/NerdPack/pkg_build.sh b/source/NerdPack/pkg_build.sh deleted file mode 100755 index 68a24194..00000000 --- a/source/NerdPack/pkg_build.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -DIR="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")" -tmpdir=/tmp/tmp.$(( $RANDOM * 19318203981230 + 40 )) -plugin=$(basename ${DIR}) -archive="$(dirname $(dirname ${DIR}))/archive" -version=$(date +"%Y.%m.%d") -package="${archive}/${plugin}-${version}-x86_64-1.txz" -md5="${archive}/${plugin}-${version}-x86_64-1.md5" - -if [[ -f $package ]]; then - for x in a b c d e d f g h ; do - package="${archive}/${plugin}-${version}${x}-x86_64-1.txz" - md5="${archive}/${plugin}-${version}${x}-x86_64-1.md5" - if [[ ! -f $package ]]; then - break - fi - done -fi - -mkdir -p $tmpdir -cd "$DIR" -cp --parents -f $(find . -type f ! \( -iname "pkg_build.sh" -o -iname "sftp-config.json" -o -iname ".DS_Store" \) ) $tmpdir/ -cd "$tmpdir/" -makepkg -l y -c y "${package}" -cd "$archive/" -md5sum $(basename "$package") > "$md5" -rm -rf "$tmpdir" - -# Verify and install plugin package -sum1=$(md5sum "${package}") -sum2=$(cat "$md5") -if [ "${sum1:0:32}" != "${sum2:0:32}" ]; then - echo "Checksum mismatched."; - rm "$md5" "${package}" -else - echo "Checksum matched." -fi \ No newline at end of file