Skip to content

Commit

Permalink
fix(main/just): fix shebang recipes
Browse files Browse the repository at this point in the history
Co-authored-by: kaike95 <[email protected]>
Co-authored-by: Ted Stein <[email protected]>
  • Loading branch information
TomJo2000 committed Nov 17, 2024
1 parent eb7c422 commit 1986443
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/just/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="A handy way to save and run project-specific commands"
TERMUX_PKG_LICENSE="CC0-1.0"
TERMUX_PKG_MAINTAINER="@flipee"
TERMUX_PKG_VERSION="1.36.0"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/casey/just/archive/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=bc2e2ff0268c2818659c524b21663564864b50ba102afb0a44fe73c08cf35ff0
TERMUX_PKG_AUTO_UPDATE=true
Expand Down
12 changes: 12 additions & 0 deletions packages/just/termux_shebang.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/src/recipe.rs b/src/recipe.rs
index 3976983a..08af8933 100644
--- a/src/recipe.rs
+++ b/src/recipe.rs
@@ -355,6 +355,7 @@ impl<'src, D> Recipe<'src, D> {
.unwrap_or_else(|| Interpreter::default_script_interpreter()),
)
} else {
+ evaluated_lines[0] = format!("#!@TERMUX_PREFIX@{}", evaluated_lines[0][2..]);
let line = evaluated_lines
.first()
.ok_or_else(|| Error::internal("evaluated_lines was empty"))?;

0 comments on commit 1986443

Please sign in to comment.