diff --git a/build-deb.package.sh b/build-deb.package.sh index c139070..b713686 100755 --- a/build-deb.package.sh +++ b/build-deb.package.sh @@ -7,6 +7,7 @@ TARGET="$PWD" export DEBIAN_FRONTEND +# dependencies {{{ dependencies() { # Update system and install basic tools apt-get update -yq && apt-get install -yq aptitude curl git patch wget @@ -20,18 +21,23 @@ dependencies() { apt-get update -yq aptitude --quiet --assume-yes install just } +# }}} +# get_eza_sources {{{ get_eza_sources() { # Clone Eza repo cd "$(mktemp -d)" git clone https://github.com/eza-community/eza cd eza } +# }}} +# Patch sample (from a PR…) {{{ patch_justfile() { # If issue 458 is still open gh_justfile_issue_opened=$(curl --location --no-progress-meter -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" \ - "https://api.github.com/search/issues?q=repo:eza-community/eza+is:open+is:issue+author:gardouille" | \grep --extended-regexp --count '"url":.*issues/458",') + "https://api.github.com/search/issues?q=repo:eza-community/eza+is:open+is:issue+author:gardouille" | \grep --extended-regexp --count '"url":.*issues/458",' \ + || echo "0") if [ "${gh_justfile_issue_opened}" = "1" ]; then echo "Patch Justfile to fix issue https://github.com/eza-community/eza/issues/458" @@ -47,27 +53,33 @@ patch_justfile() { git config --global user.email "ci@ci.ci" git config --global user.name "CI me" git commit -a -m "Fix #458 Patch Justfile and devtools script" - elif [ "${gh_justfile_issue_opened}" != "1" ]; then + elif [ ! "${gh_justfile_issue_opened}" = "1" ]; then echo "Justfile 458 patch section can be removed." else echo "Case that is not supposed to happen !" fi } +# }}} + +# build_eza_deb_package {{{ build_eza_deb_package() { # Build ./devtools/deb-package.sh } +# }}} +# copy builded package {{{ copy() { TARGET_UID="$(stat --printf %u "$TARGET")" TARGET_GID="$(stat --printf %g "$TARGET")" install -o "$TARGET_UID" -g "$TARGET_GID" -t "$TARGET/target" eza_*.deb } +# }}} main() { dependencies get_eza_sources - patch_justfile + #patch_justfile build_eza_deb_package copy }