From 6d7c66d705169f350981df80d805549b1580b8bc Mon Sep 17 00:00:00 2001 From: Simon Frankenberger Date: Thu, 20 Dec 2018 17:39:06 +0100 Subject: testing/thefuck: New aport --- testing/thefuck/APKBUILD | 30 ++++++++++++++++++++++++++++++ testing/thefuck/ash.patch | 15 +++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 testing/thefuck/APKBUILD create mode 100644 testing/thefuck/ash.patch (limited to 'testing') diff --git a/testing/thefuck/APKBUILD b/testing/thefuck/APKBUILD new file mode 100644 index 0000000000..6368852f46 --- /dev/null +++ b/testing/thefuck/APKBUILD @@ -0,0 +1,30 @@ +# Contributor: Simon Frankenberger +# Maintainer: Simon Frankenberger +pkgname=thefuck +pkgver=3.28 +pkgrel=0 +pkgdesc="The Fuck is a magnificent app that corrects errors in previous console commands." +url="https://github.com/nvbn/thefuck" +arch="noarch" +license="MIT" +depends="py3-colorama py3-six py3-decorator py3-psutil py3-pyte" +makedepends="py3-setuptools" +source="thefuck-$pkgver.tar.gz::https://github.com/nvbn/thefuck/archive/$pkgver.tar.gz +ash.patch" +builddir="$srcdir"/$pkgname-$pkgver + +check() { + python3 setup.py check +} + +build() { + python3 setup.py build +} + +package() { + python3 setup.py install --prefix=/usr --root="$pkgdir" +} + + +sha512sums="6c3edcfff604567a18209bf46aceb662ed4549efd0e3b0daee1abee8a93fbe3ff4dfa260eb74c3d560b3a798e3cc90f911072d694a0d986a09c8581e951421d2 thefuck-3.28.tar.gz +2ba9588057e986e47739463ae9c311be17f6248ce60af5d746db8ab9dea2faf7685cd7d9a1999e1e52f2623e1eb23f0b5f756816aae486b721f1782a7265ab64 ash.patch" diff --git a/testing/thefuck/ash.patch b/testing/thefuck/ash.patch new file mode 100644 index 0000000000..1efe00808a --- /dev/null +++ b/testing/thefuck/ash.patch @@ -0,0 +1,15 @@ +This patch replaces the default call to "fc" (which is a builtin +function in many shells) to a sed command to work on the alpine +default shell (ash). + +--- a/thefuck/shells/generic.py 2018-12-20 16:25:30.217136599 +0000 ++++ b/thefuck/shells/generic.py 2018-12-20 16:26:11.156565614 +0000 +@@ -35,7 +35,7 @@ + + def app_alias(self, alias_name): + return "alias {0}='eval $(TF_ALIAS={0} PYTHONIOENCODING=utf-8 " \ +- "thefuck $(fc -ln -1))'".format(alias_name) ++ "thefuck $(sed -n '\"'x;\\$p'\"' /home/build/.ash_history))'".format(alias_name) + + def instant_mode_alias(self, alias_name): + warn("Instant mode not supported by your shell") -- cgit v1.2.3