From 87e651cb07f69f597ba474507bc67a8429cbcf9e Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Tue, 12 Dec 2017 11:18:15 -0800 Subject: [PATCH] Better package list handling --- .linux_items/{AUR-Packages => packages/aur} | 0 .linux_items/packages/dependencies | 7 +++++++ Build Linux | 13 ++++++++----- 3 files changed, 15 insertions(+), 5 deletions(-) rename .linux_items/{AUR-Packages => packages/aur} (100%) create mode 100644 .linux_items/packages/dependencies diff --git a/.linux_items/AUR-Packages b/.linux_items/packages/aur similarity index 100% rename from .linux_items/AUR-Packages rename to .linux_items/packages/aur diff --git a/.linux_items/packages/dependencies b/.linux_items/packages/dependencies new file mode 100644 index 00000000..cad41935 --- /dev/null +++ b/.linux_items/packages/dependencies @@ -0,0 +1,7 @@ +archiso +attr +base-devel +curl +libewf +progsreiserfs +rsync diff --git a/Build Linux b/Build Linux index beaf6a55..f53be02f 100755 --- a/Build Linux +++ b/Build Linux @@ -6,7 +6,6 @@ ROOT_DIR="$(realpath $(dirname "$0"))" BUILD_DIR="$ROOT_DIR/BUILD_LINUX" ARCHLIVE_DIR="$BUILD_DIR/Archlive" -AUR_PACKAGES="$ROOT_DIR/.linux_items/AUR-Packages" CUSTOM_REPO_DIR="$BUILD_DIR/CustomRepo" DATE="$(date +%F)" DATETIME="$(date +%F_%H%M)" @@ -108,7 +107,7 @@ function update_repo() { mkdir "$CUSTOM_REPO_DIR" 2>/dev/null mkdir "$TMP_DIR" 2>/dev/null pushd "$TMP_DIR" >/dev/null - for p in $(cat "$AUR_PACKAGES"); do + while read -r p; do echo "Building: $p" curl -LsfO https://aur.archlinux.org/cgit/aur.git/snapshot/$p.tar.gz tar xf $p.tar.gz @@ -116,7 +115,7 @@ function update_repo() { makepkg -s --noconfirm popd >/dev/null mv -n $p/*xz "$CUSTOM_REPO_DIR"/ - done + done < "$ROOT_DIR/.linux_items/packages/aur" popd >/dev/null # Build custom repo database @@ -126,8 +125,12 @@ function update_repo() { } function install_deps() { - echo "Installing dependancies..." - run_elevated pacman -Syu --needed --noconfirm archiso attr base-devel curl libewf progsreiserfs rsync + echo "Installing dependencies..." + packages= + while read -r line; do + packages="$packages $line" + done < "$ROOT_DIR/.linux_items/packages/dependencies" + run_elevated pacman -Syu --needed --noconfirm $packages } function build_arch() {