From 65d8ebce17e984445794f603bc59b5c1a7cf840a Mon Sep 17 00:00:00 2001 From: Kyattsukuro Date: Tue, 17 Mar 2026 17:00:20 +0100 Subject: [PATCH] Added install and run scripts --- install.sh | 22 ++++++++++++++++++++++ run.sh | 6 ++++++ 2 files changed, 28 insertions(+) create mode 100755 install.sh create mode 100755 run.sh diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..08cb30e --- /dev/null +++ b/install.sh @@ -0,0 +1,22 @@ +#!/usr/share/env bash + +# Target dir is config vecause this will never include binary blops +TARGET_DIR="$HOME/.config/fledermaus-formatter" +if [ -d $TARGET_DIR ]; then + rm -rf "${TARGET_DIR}" +fi +mkdir -p $TARGET_DIR +git clone git@git.urmel.de:Kyattsukuro/fledermaus.git "$TARGET_DIR" +python -m venv $TARGET_DIR/.venv +source $TARGET_DIR/.venv/bin/activate +pip install -r $TARGET_DIR/requirements.txt + +mkdir -p $HOME/.local/share/bin/ + +rm -r $HOME/.local/share/bin/fledermaus-formater > /dev/zero +ln -s $TARGET_DIR/run.sh ~/.local/share/bin/fledermaus-formater + +if [[ ":$PATH:" != *":$HOME/.local/share/bin:"* ]]; then + echo 'export PATH="$HOME/.local/share/bin:$PATH"' >> ~/.bashrc + export PATH="$HOME/.local/share/bin:$PATH" +fi \ No newline at end of file diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..d26757b --- /dev/null +++ b/run.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +SCRIPT_DIR="$HOME/.config/fledermaus-formatter" + +cd $SCRIPT_DIR +python __init__.py $@ \ No newline at end of file