aboutsummaryrefslogtreecommitdiffstats
path: root/testing/thefuck
diff options
context:
space:
mode:
authorSimon Frankenberger <simon@fraho.eu>2018-12-20 17:39:06 +0100
committerKevin Daudt <kdaudt@alpinelinux.org>2019-05-12 07:20:36 +0000
commit6d7c66d705169f350981df80d805549b1580b8bc (patch)
tree78210b13becba398bed85ee798c399e6a44a6acc /testing/thefuck
parent9009ca6569474691d0eb9dcdb11f373a0e44e33a (diff)
downloadaports-6d7c66d705169f350981df80d805549b1580b8bc.tar.bz2
aports-6d7c66d705169f350981df80d805549b1580b8bc.tar.xz
testing/thefuck: New aport
Diffstat (limited to 'testing/thefuck')
-rw-r--r--testing/thefuck/APKBUILD30
-rw-r--r--testing/thefuck/ash.patch15
2 files changed, 45 insertions, 0 deletions
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 <simon-alpine@fraho.eu>
+# Maintainer: Simon Frankenberger <simon-alpine@fraho.eu>
+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")