summary refs log tree commit diff
path: root/pkgs/applications/version-management/transcrypt/helper-scripts_depspathprefix.patch
blob: 925aadab3dd598bfb80b71f1990f5f454334a5eb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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