-
-
Notifications
You must be signed in to change notification settings - Fork 14k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
emacsPackages: use better SCRIPT_DIR detection in update scripts
- Loading branch information
1 parent
c7c5aae
commit 599ee53
Showing
2 changed files
with
9 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)" -- . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |