|
|
@ -5,7 +5,7 @@ |
|
|
|
# SPDX-License-Identifier: GPL-2.0-only |
|
|
|
# SPDX-License-Identifier: GPL-2.0-only |
|
|
|
# |
|
|
|
# |
|
|
|
# Build the Linux kernel |
|
|
|
# Build the Linux kernel |
|
|
|
# Depends: asp, base-devel |
|
|
|
# Depends: asp, base-devel, coreutils |
|
|
|
|
|
|
|
|
|
|
|
# Setup |
|
|
|
# Setup |
|
|
|
# -------------------------------------- |
|
|
|
# -------------------------------------- |
|
|
@ -37,6 +37,7 @@ checkDependencies() |
|
|
|
dependencies=" |
|
|
|
dependencies=" |
|
|
|
asp |
|
|
|
asp |
|
|
|
base-devel |
|
|
|
base-devel |
|
|
|
|
|
|
|
coreutils |
|
|
|
" |
|
|
|
" |
|
|
|
|
|
|
|
|
|
|
|
for dependency in $dependencies; do |
|
|
|
for dependency in $dependencies; do |
|
|
@ -74,8 +75,42 @@ build() |
|
|
|
time makepkg -s |
|
|
|
time makepkg -s |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
install() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
cdSafe build |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
packages="$(find . -name "*.tar.zst" -type f)" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
found="$(echo "$packages" | wc -l)" |
|
|
|
|
|
|
|
if [ "$found" -ne 2 ]; then |
|
|
|
|
|
|
|
echo "${b}${red}Error:${n} kernel was not build yet." >&2 |
|
|
|
|
|
|
|
exit 1 |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ! sudo -v; then |
|
|
|
|
|
|
|
echo "${b}${red}Error:${n} you cannot perform this operation uness you are root." >&2 |
|
|
|
|
|
|
|
exit 1 |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "$packages" | xargs --open-tty sudo pacman -U --needed |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
# Execute |
|
|
|
# Execute |
|
|
|
# -------------------------------------- |
|
|
|
# -------------------------------------- |
|
|
|
|
|
|
|
|
|
|
|
checkDependencies |
|
|
|
checkDependencies |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
script="$(basename "$0")" |
|
|
|
|
|
|
|
case "$1" in |
|
|
|
|
|
|
|
build | "") |
|
|
|
build |
|
|
|
build |
|
|
|
|
|
|
|
;; |
|
|
|
|
|
|
|
install) |
|
|
|
|
|
|
|
install |
|
|
|
|
|
|
|
;; |
|
|
|
|
|
|
|
*) |
|
|
|
|
|
|
|
echo "$script: invalid option '$1'" >&2 |
|
|
|
|
|
|
|
echo "Try '$script -h' for more information." >&2 |
|
|
|
|
|
|
|
exit 1 |
|
|
|
|
|
|
|
;; |
|
|
|
|
|
|
|
esac |
|
|
|