Added enviornmental options to build.sh

This commit is contained in:
Wizzard 2024-01-27 23:04:13 -05:00
parent 89b6e0c4db
commit c93b704a66
1 changed files with 9 additions and 5 deletions

View File

@ -1,13 +1,17 @@
#!/bin/bash #!/bin/bash
kernel_version="6.7.2"
zen_version="zen1"
source_url="https://github.com/zen-kernel/zen-kernel/archive/refs/tags/v${kernel_version}-${zen_version}.tar.gz"
source_file="v${kernel_version}-${zen_version}.tar.gz"
is_package_installed() { is_package_installed() {
dnf list installed "$1" &> /dev/null dnf list installed "$1" &> /dev/null
return $? return $?
} }
if [ -f "SOURCES/${source_file}" ]; then
if [ -f "SOURCES/v6.7.2-zen1.tar.gz" ]; then rm -f "SOURCES/${source_file}"
rm -f "SOURCES/v6.7.2-zen1.tar.gz"
fi fi
for dir in BUILD BUILDROOT RPMS SOURCES SPECS SRPMS; do for dir in BUILD BUILDROOT RPMS SOURCES SPECS SRPMS; do
@ -24,8 +28,8 @@ for package in "${required_packages[@]}"; do
fi fi
done done
if [ ! -f "SOURCES/v6.7.2-zen1.tar.gz" ]; then if [ ! -f "SOURCES/${source_file}" ]; then
wget -P SOURCES/ https://github.com/zen-kernel/zen-kernel/archive/refs/tags/v6.7.2-zen1.tar.gz wget -P SOURCES/ "${source_url}"
fi fi
rpmbuild -ba --define "_topdir $PWD" SPECS/linux-zen.spec rpmbuild -ba --define "_topdir $PWD" SPECS/linux-zen.spec