Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gitAndTools.transcrypt: query dependencies in helper scripts
adds a tool to get the paths of the dependencies needed by the helper scripts (which are written only once and are never updated) to the output and patches them to use it expand their path
- Loading branch information
Showing
2 changed files
with
45 additions
and
0 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
37 changes: 37 additions & 0 deletions
37
...lications/version-management/git-and-tools/transcrypt/helper-scripts_depspathprefix.patch
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
diff --git a/transcrypt b/transcrypt | ||
index a0b562d..7888f5d 100755 | ||
--- a/transcrypt | ||
+++ b/transcrypt | ||
@@ -278,6 +278,7 @@ save_helper_scripts() { | ||
|
||
cat <<-'EOF' > "${GIT_DIR}/crypt/clean" | ||
#!/usr/bin/env bash | ||
+ PATH="$(transcrypt-depspathprefix 2>/dev/null)$PATH" | ||
filename=$1 | ||
# ignore empty files | ||
if [[ -s $filename ]]; then | ||
@@ -300,6 +301,7 @@ save_helper_scripts() { | ||
|
||
cat <<-'EOF' > "${GIT_DIR}/crypt/smudge" | ||
#!/usr/bin/env bash | ||
+ PATH="$(transcrypt-depspathprefix 2>/dev/null)$PATH" | ||
tempfile=$(mktemp 2> /dev/null || mktemp -t tmp) | ||
trap 'rm -f "$tempfile"' EXIT | ||
cipher=$(git config --get --local transcrypt.cipher) | ||
@@ -309,6 +311,7 @@ save_helper_scripts() { | ||
|
||
cat <<-'EOF' > "${GIT_DIR}/crypt/textconv" | ||
#!/usr/bin/env bash | ||
+ PATH="$(transcrypt-depspathprefix 2>/dev/null)$PATH" | ||
filename=$1 | ||
# ignore empty files | ||
if [[ -s $filename ]]; then | ||
@@ -351,7 +354,7 @@ save_configuration() { | ||
git config merge.renormalize 'true' | ||
|
||
# add a git alias for listing encrypted files | ||
- git config alias.ls-crypt "!git ls-files | git check-attr --stdin filter | awk 'BEGIN { FS = \":\" }; /crypt$/{ print \$1 }'" | ||
+ git config alias.ls-crypt "!PATH=\"\$(transcrypt-depspathprefix 2>/dev/null)\$PATH\"; git ls-files | git check-attr --stdin filter | awk 'BEGIN { FS = \":\" }; /crypt$/{ print \$1 }'" | ||
} | ||
|
||
# display the current configuration settings |