Skip to content
Snippets Groups Projects

Arch Build Package

  • Clone with SSH
  • Clone with HTTPS
  • Embed
  • Share
    The snippet can be accessed without any authentication.
    Authored by Ophestra

    But why?

    Edited
    build_package.sh 561 B
    #!/bin/sh
    [ -n "$1" ] || sh -c 'echo -e "\033[01;31mPlease specify the package name."; exit 1'
    rm -rf "/pkgbuild/repositories/$1"
    git clone "https://aur.archlinux.org/$1.git" "/pkgbuild/repositories/$1" || sh -c 'echo -e "\033[01;31mThe build encountered an error while fetching the PKGBUILD."; exit 1'
    cd "/pkgbuild/repositories/$1"
    makechrootpkg -c -r "/pkgbuild/build" || sh -c 'echo -e "\033[01;31mThe build encountered an error while making the package."; exit 1'
    sh -c "cp /pkgbuild/repositories/$1/*.pkg.tar.xz /pkgbuild/jenkins/workspace/AUR/$1"
    exit 0
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment