summary refs log tree commit diff
path: root/pkgs/applications/science/math/sage/shebangs.patch
blob: 96ed5a4bc6c3a18d00756e5d8ec9670ccb50166d (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
diff --git a/build/bin/sage-spkg b/build/bin/sage-spkg
index 83e61a7e0d..942ba206c7 100755
--- a/build/bin/sage-spkg
+++ b/build/bin/sage-spkg
@@ -648,8 +648,12 @@ if ! sage-apply-patches; then
     error_msg "Error applying patches"
     exit 1
 fi
+
+@bash@/bin/bash @patchSageShebangs@ .
+
 cd ..
 
+
 ##################################################################
 # The package has been extracted, prepare for installation
 ##################################################################
@@ -671,7 +675,7 @@ write_script_wrapper() {
     local tmpscript="$(dirname "$script")/.tmp-${script##*/}"
 
     cat > "$tmpscript" <<__EOF__
-#!/usr/bin/env bash
+#! @bash@/bin/bash
 
 export SAGE_ROOT="$SAGE_ROOT"
 export SAGE_SRC="$SAGE_SRC"
@@ -833,6 +837,9 @@ if [ "$UNAME" = "CYGWIN" ]; then
     sage-rebase.sh "$SAGE_LOCAL" 2>/dev/null
 fi
 
+@bash@/bin/bash @patchSageShebangs@ .
+@bash@/bin/bash @patchSageShebangs@ "$out/bin"
+
 echo "Successfully installed $PKG_NAME"
 
 if [ "$SAGE_CHECK" = "yes" ]; then