26 lines
779 B
Bash
Executable File
26 lines
779 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Script name: build-packages.sh
|
|
# Description: Script for automating 'makepkg' on the PKGBUILDS.
|
|
# GitLab: https://www.gitlab.com/cabooshyy/cbsh-arch-pkgbuild
|
|
# Contributors: Cameron Miller
|
|
|
|
# Set with the flags "-e", "-u","-o pipefail" cause the script to fail
|
|
# if certain things happen, which is a good thing. Otherwise, we can
|
|
# get hidden bugs that are hard to discover.
|
|
set -euo pipefail
|
|
|
|
echo "$0"
|
|
full_path=$(realpath "$0")
|
|
dir_path=${full_path%/*}
|
|
|
|
readarray -t x86_list <<< "$(find x86_64/ -type f -name PKGBUILD | awk -F / '{print $2}')"
|
|
|
|
for x in "${x86_list[@]}"
|
|
do
|
|
cd "${dir_path}"/x86_64/"${x}"
|
|
echo "### Making ${dir_path}/x86_64/${x} ###"
|
|
makepkg -scf
|
|
find . -mindepth 1 -maxdepth 1 -type d -print0 | xargs -r0 rm -R
|
|
done
|