diff --git a/appimage/entrypoint.sh b/appimage/entrypoint.sh new file mode 100644 index 0000000..016f26e --- /dev/null +++ b/appimage/entrypoint.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env sh + +{{ python-executable }} "${APPDIR}/opt/python{{ python-version }}/bin/thefuck" "$@" + diff --git a/appimage/thefuck-appimage-build.sh b/appimage/thefuck-appimage-build.sh new file mode 100755 index 0000000..2373501 --- /dev/null +++ b/appimage/thefuck-appimage-build.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env sh + +set -e + +BUILD_DIR="$(git rev-parse --show-toplevel)/build" + +mkdir -p "$BUILD_DIR" +docker build .. -f ./thefuck-appimage.Dockerfile -t tmp/thefuck-appimage --no-cache --force-rm +docker run --rm -v "$BUILD_DIR":/result tmp/thefuck-appimage +echo "Done. Appimage saved in $BUILD_DIR directory: $(ls -sh1 "$BUILD_DIR")" + diff --git a/appimage/thefuck-appimage.Dockerfile b/appimage/thefuck-appimage.Dockerfile new file mode 100644 index 0000000..845b1b3 --- /dev/null +++ b/appimage/thefuck-appimage.Dockerfile @@ -0,0 +1,20 @@ +FROM python:3.8-slim-buster +VOLUME /result + +RUN apt update && \ + apt install -y git file gpg && \ + pip install git+https://github.com/niess/python-appimage pip-tools pipreqs && \ + mkdir -p /result + +ADD . /thefuck +WORKDIR /thefuck/thefuck +RUN pipreqs --savepath=requirements.in &&\ + pip-compile && \ + rm ./requirements.in && \ + sed -i -e '1 i\\/thefuck' requirements.txt && \ + mv ./requirements.txt /thefuck/appimage + +WORKDIR /thefuck +RUN python -m python_appimage build app -p 3.8 /thefuck/appimage + +CMD cp /thefuck/thefuck-x86_64.AppImage /result diff --git a/appimage/thefuck.appdata.xml b/appimage/thefuck.appdata.xml new file mode 100644 index 0000000..f469b99 --- /dev/null +++ b/appimage/thefuck.appdata.xml @@ -0,0 +1,17 @@ + + + thefuck + MIT + MIT + thefuck + thefuck app running python {{ python-fullversion }} + +

Magnificent app which corrects your previous console command.

+
+ thefuck.desktop + https://github.com/nvbn/thefuck + + python{{ python-version }} + +
+ diff --git a/appimage/thefuck.desktop b/appimage/thefuck.desktop new file mode 100644 index 0000000..a42d235 --- /dev/null +++ b/appimage/thefuck.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Name=thefuck +Exec=thefuck +Comment=Magnificent app which corrects your previous console command. +Icon=python +Categories=System;Utility; +Terminal=true