diff --git a/pkgs/applications/editors/emacs/elisp-packages/update b/pkgs/applications/editors/emacs/elisp-packages/update index 02701fb546d95..e9f649c8aa50e 100755 --- a/pkgs/applications/editors/emacs/elisp-packages/update +++ b/pkgs/applications/editors/emacs/elisp-packages/update @@ -1,10 +1,12 @@ #!/usr/bin/env bash set -euo pipefail -SCRIPT_DIR="$( cd "$(dirname "$0")" ; pwd -P )" -cd "$SCRIPT_DIR" +# Classic "where I am" block +# https://www.binaryphile.com/bash/2020/01/12/determining-the-location-of-your-script-in-bash.html +SCRIPT_DIR=$(cd $(dirname ${BASH_SOURCE[0]}); cd -P $(dirname $(readlink ${BASH_SOURCE[0]} || echo .)); pwd) +cd "${SCRIPT_DIR}" ./update-from-overlay ./update-manual -git commit -m "emacs.pkgs.manualPackages: $(date --iso)" -- . +git commit -m "emacsPackages.manualPackages: updated at $(date --iso) (non-interactively)" -- . diff --git a/pkgs/applications/editors/emacs/elisp-packages/update-manual b/pkgs/applications/editors/emacs/elisp-packages/update-manual index 3b199eecc3d2b..1a83f14b7b74b 100755 --- a/pkgs/applications/editors/emacs/elisp-packages/update-manual +++ b/pkgs/applications/editors/emacs/elisp-packages/update-manual @@ -1,7 +1,9 @@ #!/usr/bin/env bash set -euo pipefail -SCRIPT_DIR="$( cd "$(dirname "$0")" ; pwd -P )" -cd "$SCRIPT_DIR" +# Classic "where I am" block +# https://www.binaryphile.com/bash/2020/01/12/determining-the-location-of-your-script-in-bash.html +SCRIPT_DIR=$(cd $(dirname ${BASH_SOURCE[0]}); cd -P $(dirname $(readlink ${BASH_SOURCE[0]} || echo .)); pwd) +cd "${SCRIPT_DIR}" nix-build --no-out-link update-manual.nix | xargs -n 1 -P $(nproc) bash -c