amdgpud/scripts/zip-local.sh

71 lines
1.2 KiB
Bash
Raw Normal View History

2022-06-15 15:20:52 +02:00
#!/usr/bin/env zsh
2022-06-16 08:04:45 +02:00
version=$1
if [[ "$version" == "" ]];
then
echo "VERSION is needed"
exit 1
fi
2022-06-15 15:20:52 +02:00
set -e +x
2022-02-10 09:51:53 +01:00
cd "$(git rev-parse --show-toplevel)"
2022-06-15 15:20:52 +02:00
ROOT="$(git rev-parse --show-toplevel)"
2022-06-16 08:04:45 +02:00
echo Building archlinux.tar.gz
2022-02-10 09:51:53 +01:00
2022-06-15 15:20:52 +02:00
./scripts/build.sh
build_tag_gz() {
zip_name=$1
cd ${ROOT}
for name in $*; do
cp ${ROOT}/target/x86_64-unknown-linux-musl/release/${name} ${ROOT}/tmp
cp ${ROOT}/services/${name}.service ./tmp
cd ${ROOT}/tmp
2022-06-16 08:04:45 +02:00
tar -cvf ${zip_name}-${version}.tar.gz ${name}.service ${name}
2022-06-15 15:20:52 +02:00
cd ${ROOT}
done
cd ${ROOT}/tmp
for name in $*; do
rm ${name}.service ${name}
done
cd ${ROOT}
}
tar_gui() {
tar_name=$1
cd ${ROOT}/tmp
unzip ${tar_name}.zip
2022-06-16 08:04:45 +02:00
rm ${tar_name}.zip
2022-06-15 15:20:52 +02:00
cp ${ROOT}/target/x86_64-unknown-linux-musl/release/amdgui-helper ${ROOT}/tmp
cp ${ROOT}/services/amdgui-helper.service ${ROOT}/tmp
2022-06-16 08:04:45 +02:00
tar -cvf ${tar_name}-${version}.tar.gz amdgui-helper amdguid amdgui-helper.service
rm amdgui-helper
rm amdgui-helper.service
rm amdguid
2022-06-15 15:20:52 +02:00
}
build_tag_gz amdfand
build_tag_gz amdmond
build_tag_gz amdvold
tar_gui amdguid-wayland
tar_gui amdguid-glium
tar_gui amdguid-glow
2022-02-10 09:51:53 +01:00
2022-06-15 15:20:52 +02:00
cd ${ROOT}/tmp
2022-02-10 09:51:53 +01:00
2022-06-15 15:20:52 +02:00
for f in $(ls *.tar.gz); do
md5sum $f
done
2022-02-10 09:51:53 +01:00
2022-06-16 08:04:45 +02:00
tar -cvf archlinux-${version}.tar.gz *.tar.gz