This repository has been archived on 2022-02-23. You can view files and clone it, but cannot push or open issues or pull requests.
lets/pp/oppai-ng/release

37 lines
594 B
Plaintext
Raw Permalink Normal View History

2018-12-09 05:15:56 +00:00
#!/bin/sh
dir=$(dirname $0)
olddir=$(pwd)
cd $dir
git pull origin master
echo -e "\nCompiling and Stripping"
./build -static -no-pie || exit 1
echo -e "\nPackaging"
folder="oppai-$(./oppai -version)-"
folder="${folder}$(gcc -dumpmachine)"
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
rm -rf "$folder"
cd $olddir