acl/packaging/control
wanghaibin 39d6abaf74 Squashed commit of the following:
commit 98dfe6d58a00a825465ada1255098c1f4149f703
Author: wanghaibin <wanghaibin@qiyi.com>
Date:   Fri Jun 5 23:21:04 2020 +0800

    modify acl-libs

commit 04d9b89f8b7427825eb45e0dc3b25a5274a627f3
Author: wanghaibin <wanghaibin@qiyi.com>
Date:   Fri Jun 5 23:13:46 2020 +0800

    modify makefile

commit d292ad9c3f6b6ad170e480950ff87c1954d03de8
Author: wanghaibin <wanghaibin@qiyi.com>
Date:   Fri Jun 5 23:08:10 2020 +0800

    modify makefile

commit 6f8d0739e9408e140720f127dbf3eab421082287
Author: wanghaibin <wanghaibin@qiyi.com>
Date:   Fri Jun 5 22:59:15 2020 +0800

    modify master spec

commit 3da0067873a28a35588ff550a77f6227297530cc
Author: wanghaibin <wanghaibin@qiyi.com>
Date:   Fri Jun 5 22:47:09 2020 +0800

    add master spec
2020-06-05 23:25:57 +08:00

37 lines
706 B
Bash
Executable File

#!/usr/bin/env bash
set -x
set -euo pipefail
IFS=$'\n\t'
function pack() {
PKG_NAME=${1}
PKG_VERSION=$(grep '^Version:' ${PKG_NAME}.spec | awk '{print $2}')
cd ..
PROJECT_NAME="${PKG_NAME}-${PKG_VERSION}"
git archive --format=tar --prefix=$PROJECT_NAME/ HEAD | (tar xpf -) #归档父项目后解压到指定目录
tar zcpf ${PROJECT_NAME}.tar.gz ${PROJECT_NAME}
/bin/mv -f ${PROJECT_NAME}.tar.gz packaging
rm -rf ${PKG_NAME}-${PKG_VERSION}
cd -
}
function help() {
echo "$0 build|pack"
}
function help() {
echo "$0 build|pack"
}
if [ "$1" == "" ]; then
help
elif [ "$1" == "pack" ];then
pack $2
elif [ "$1" == "test" ];then
run_test
else
help
fi