Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emacsPackages: use better SCRIPT_DIR detection in update scripts #352766

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions pkgs/applications/editors/emacs/elisp-packages/update
Original file line number Diff line number Diff line change
@@ -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)" -- .
6 changes: 4 additions & 2 deletions pkgs/applications/editors/emacs/elisp-packages/update-manual
Original file line number Diff line number Diff line change
@@ -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