From c86fb455fa6595a0442be12af72a0f768ef4ac4d Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Thu, 26 Sep 2019 17:32:43 +0300 Subject: [PATCH] new package: fastmod --- packages/fastmod/build.sh | 8 ++++++++ packages/fastmod/vi-as-default-editor.patch | 12 ++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 packages/fastmod/build.sh create mode 100644 packages/fastmod/vi-as-default-editor.patch diff --git a/packages/fastmod/build.sh b/packages/fastmod/build.sh new file mode 100644 index 0000000000..711070721d --- /dev/null +++ b/packages/fastmod/build.sh @@ -0,0 +1,8 @@ +TERMUX_PKG_HOMEPAGE=https://github.com/facebookincubator/fastmod +TERMUX_PKG_DESCRIPTION="Regex-based code refactoring utility" +TERMUX_PKG_LICENSE="Apache-2.0" +TERMUX_PKG_MAINTAINER="Leonid Plyushch " +TERMUX_PKG_VERSION=0.2.6 +TERMUX_PKG_SRCURL=https://github.com/facebookincubator/fastmod/archive/v$TERMUX_PKG_VERSION.tar.gz +TERMUX_PKG_SHA256=b70f615e883cc6cc235b62ee15ec2ec7ef4b04618b42fb79d8ee807440f6cf3c +TERMUX_PKG_BUILD_IN_SRC=true diff --git a/packages/fastmod/vi-as-default-editor.patch b/packages/fastmod/vi-as-default-editor.patch new file mode 100644 index 0000000000..2c8923fd73 --- /dev/null +++ b/packages/fastmod/vi-as-default-editor.patch @@ -0,0 +1,12 @@ +diff -uNr fastmod-0.2.6/src/main.rs fastmod-0.2.6.mod/src/main.rs +--- fastmod-0.2.6/src/main.rs 2019-07-25 02:38:07.000000000 +0300 ++++ fastmod-0.2.6.mod/src/main.rs 2019-09-26 17:24:36.272089773 +0300 +@@ -80,7 +80,7 @@ + } + + fn run_editor(path: &Path, start_line: usize) -> Result<()> { +- let editor = env::var("EDITOR").unwrap_or_else(|_| String::from("vim")); ++ let editor = env::var("EDITOR").unwrap_or_else(|_| String::from("vi")); + let args: Vec<&str> = editor.split(' ').collect(); + let mut editor_cmd = { + let mut cmd = Command::new(args[0])