-
Notifications
You must be signed in to change notification settings - Fork 1
/
compile.sh
25 lines (18 loc) · 828 Bytes
/
compile.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
# Create a temporary directory to hold package output
mkdir -p package_output
# Install required dependencies
sudo pacman -Sy --noconfirm base-devel devtools wget git --overwrite '*'
# Clone the repository
git clone https://aur.archlinux.org/linux-g14.git
# Install extra dependencies needed for building the kernel
makedepends=$(awk '/^makedepends=\(/,/\)/ {gsub(/[\(\)]/,""); gsub(/^makedepends= /, ""); print}' linux-g14/PKGBUILD | tr -d '\n' | sed 's/#.*//; s/ */ /g' | sed 's/makedepends=//')
sudo pacman -Sy --noconfirm $makedepends --needed --overwrite '*'
# Build the package using makepkg
cp add-lines.sh linux-g14/add-lines.sh
chmod +x linux-g14/add-lines.sh
cd linux-g14
sh add-lines.sh
makepkg -s --noconfirm --skippgpcheck
# Move the generated package files
mv *.pkg.tar.zst ../package_output/