Skip to content

Commit

Permalink
add release sh script
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco149 committed Aug 15, 2017
1 parent 2257b73 commit 09d7972
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions release
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh

dir=$(dirname $0)

git pull origin master

echo -e "\nCompiling and Stripping"
. "$dir"/build -static -no-pie || exit 1

echo -e "\nPackaging"
folder="oppai-$(./oppai -version)-"
folder="${folder}$(uname | tr '[:upper:]' '[:lower:]')-$(uname -m)"

mkdir -p "$folder"
mv ./oppai $folder/oppai
git archive HEAD --prefix=src/ -o "$folder"/src.tar
cd "$folder"
tar xf src.tar
cd ..

rm "$folder".tar.xz
tar -cvJf "$folder".tar.xz \
"$folder"/oppai \
"$folder"/src

echo -e "\nResult:"
tar tf "$folder".tar.xz

readelf --dynamic "$folder"/oppai
ldd "$folder"/oppai

0 comments on commit 09d7972

Please sign in to comment.