From 58673a27eceb43bf16feae90689fb5b50b82e6e4 Mon Sep 17 00:00:00 2001 From: langfingaz Date: Thu, 13 May 2021 15:14:49 +0000 Subject: [PATCH] minor --- build-pkg-docker.sh | 34 +++++++++++++++++++++++++++++----- pkg/de-p1st-repo/PKGBUILD | 2 +- pkg/de-p1st-repo/arch-repo.cfg | 6 +++--- run.sh | 4 ++-- 4 files changed, 35 insertions(+), 11 deletions(-) diff --git a/build-pkg-docker.sh b/build-pkg-docker.sh index 2a4db51..ce0a6c0 100755 --- a/build-pkg-docker.sh +++ b/build-pkg-docker.sh @@ -12,11 +12,13 @@ function start-docker() { case "${res}" in "ActiveState=active") # Docker service is active - ;; + true + ;; "ActiveState=inactive") # Docker service is inactive -> Let's start it echo "Starting docker service ..." sudo systemctl start docker || return $? + sleep 5s ;; *) echo "Unknown state or error!" @@ -28,14 +30,36 @@ function build-pkg() { sudo docker-compose run makepkg "${1}" } +function push-pkg() { + arch-repo-push-new || return $? # Push remote repository +} + +function build-and-push() { + for PKG in "$@"; do + build-pkg "${PKG}" || return $? + done + push-pkg || return $? +} + function main() { start-docker || return $? is-installed "docker-compose" || return $? - PKGS=(xorg-meta de-p1st-systemd de-p1st-sudo de-p1st-screen de-p1st-pacman de-p1st-pacman-mirrorlist de-p1st-networkmanager de-p1st-ucode-placeholder de-p1st-ucode-intel de-p1st-ucode-amd de-p1st-nano de-p1st-mkinitcpio de-p1st-makepkg de-p1st-grub de-p1st-font de-p1st-keyboard-de de-p1st-keyboard-x11-de de-p1st-gnupg de-p1st-redshift de-p1st-theme de-p1st-gpu-generic de-p1st-gpu-amdgpu de-p1st-installer de-p1st-repo) - for PKG in "${PKGS[@]}"; do - build-pkg "${PKG}" || return $? - done +# PKGS=(xorg-meta de-p1st-systemd de-p1st-sudo de-p1st-screen de-p1st-pacman de-p1st-pacman-mirrorlist de-p1st-networkmanager de-p1st-ucode-placeholder de-p1st-ucode-intel de-p1st-ucode-amd de-p1st-nano de-p1st-mkinitcpio de-p1st-makepkg de-p1st-grub de-p1st-font de-p1st-keyboard-de de-p1st-keyboard-x11-de de-p1st-gnupg de-p1st-redshift de-p1st-theme de-p1st-gpu-generic de-p1st-gpu-amdgpu de-p1st-installer de-p1st-repo) +# for PKG in "${PKGS[@]}"; do +# build-pkg "${PKG}" || return $? +# done + + # Stage1 + build-and-push xorg-meta de-p1st-systemd de-p1st-sudo de-p1st-screen de-p1st-pacman de-p1st-pacman-mirrorlist de-p1st-networkmanager de-p1st-ucode-placeholder de-p1st-ucode-intel de-p1st-ucode-amd de-p1st-nano de-p1st-mkinitcpio de-p1st-makepkg de-p1st-grub de-p1st-font de-p1st-keyboard-de de-p1st-keyboard-x11-de de-p1st-gnupg de-p1st-redshift de-p1st-theme de-p1st-gpu-generic de-p1st-gpu-amdgpu de-p1st-installer de-p1st-repo || return $? + # Stage2 + build-and-push de-p1st-smartcard de-p1st-kernel-default de-p1st-kernel-lts de-p1st-dns || return $? + # Stage3 + build-and-push de-p1st-base || return $? + # Stage4 + build-and-push de-p1st-xfce4 || return $? + # Stage5 + build-and-push de-p1st-xfce4-hidpi || return $? echo "Successfully built all packages!" } diff --git a/pkg/de-p1st-repo/PKGBUILD b/pkg/de-p1st-repo/PKGBUILD index e55607a..37c8c9b 100644 --- a/pkg/de-p1st-repo/PKGBUILD +++ b/pkg/de-p1st-repo/PKGBUILD @@ -3,7 +3,7 @@ _pkgname=repo _reponame=arch pkgname="de-p1st-$_pkgname" pkgver=0.2.0 -pkgrel=1 +pkgrel=2 pkgdesc="Bash script to manage remote Arch Linux repository" arch=('any') url="https://codeberg.org/privacy1st/${_reponame}" diff --git a/pkg/de-p1st-repo/arch-repo.cfg b/pkg/de-p1st-repo/arch-repo.cfg index fffa1da..ff67bdb 100644 --- a/pkg/de-p1st-repo/arch-repo.cfg +++ b/pkg/de-p1st-repo/arch-repo.cfg @@ -1,6 +1,6 @@ -# host from ssh configuration which logs in +# Host from ssh configuration which logs in # as correct user to have write access to -# REMOTE_PKG_DIR +# REMOTE_PKG_DIR. REMOTE_SSH_HOST=rootnas LOCAL_PKG_DIRS=('/home/custompkgs' '/home/yoda/Downloads/git/arch/out') @@ -8,7 +8,7 @@ REMOTE_PKG_DIR=/mnt/data/live/arch-repo REMOTE_DB_NAME=de-p1st # -# Some variables for index.html generation +# Some variables for index.html generation. # HTML_TITLE='privacy1st.de Arch Packages' HTML_HEADING='My personalized Arch Packages' diff --git a/run.sh b/run.sh index b253747..5a36674 100644 --- a/run.sh +++ b/run.sh @@ -41,8 +41,8 @@ function main(){ sudo chown "build:wheel" /out - # Refresh mirrors -> not required as makepkg does this on every run - # sudo pacman -Sy + # Refresh mirrors + sudo pacman -Sy # If first argument is zero, use default directory if [ -z "${1}" ]; then