Skip to content

Commit

Permalink
Refine user-package (v2ray#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
Loyalsoldier authored Oct 7, 2020
1 parent 8071aa9 commit 7ef520b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions release/user-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ cleanup() { rm -rf "$TMP"; }
trap cleanup INT TERM ERR

get_source() {
echo ">>> Getting v2ray sources..."
echo ">>> Clone v2fly/v2ray-core repo..."
git clone https://github.com/v2fly/v2ray-core.git
pushd v2ray-core
cd v2ray-core
go mod download
}

build_v2() {
if [[ $nosource != 1 ]]; then
pushd ${SRCDIR}/v2ray-core
cd ${SRCDIR}/v2ray-core
local VERSIONTAG=$(git describe --abbrev=0 --tags)
else
echo ">>> Use current directory as WORKDIR"
Expand Down Expand Up @@ -55,21 +55,21 @@ build_dat() {

copyconf() {
echo ">>> Copying config..."
pushd ./release/config
cd ./release/config
tar c --exclude "*.dat" --exclude "systemd/**" . | tar x -C "$TMP"
}

packzip() {
echo ">>> Generating zip package"
pushd "$TMP"
cd "$TMP"
local PKG=${SRCDIR}/v2ray-custom-${GOARCH}-${GOOS}-${PKGSUFFIX}${NOW}.zip
zip -r "$PKG" .
echo ">>> Generated: $(basename "$PKG") at $(dirname "$PKG")"
}

packtgz() {
echo ">>> Generating tgz package"
pushd "$TMP"
cd "$TMP"
local PKG=${SRCDIR}/v2ray-custom-${GOARCH}-${GOOS}-${PKGSUFFIX}${NOW}.tar.gz
tar cvfz "$PKG" .
echo ">>> Generated: $(basename "$PKG") at $(dirname "$PKG")"
Expand All @@ -78,7 +78,7 @@ packtgz() {
packtgzAbPath() {
local ABPATH="$1"
echo ">>> Generating tgz package at $ABPATH"
pushd "$TMP"
cd "$TMP"
tar cvfz "$ABPATH" .
echo ">>> Generated: $ABPATH"
}
Expand Down

0 comments on commit 7ef520b

Please sign in to comment.