summaryrefslogtreecommitdiff
path: root/install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/install.sh b/install.sh
new file mode 100755
index 0000000..51c45fd
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+NAME=simpleddns
+BINARY_DIR=$HOME/.local/bin
+CONFIG=${XDG_CONFIG_HOME:-$HOME/.config}/$NAME
+mkdir -p $BINARY_DIR $CONFIG || exit 1
+python -m venv $CONFIG/venv || exit 1
+$CONFIG/venv/bin/pip install -U --upgrade-strategy eager -r requirements.txt || exit 1
+sed "s,/usr/bin/env python3,$CONFIG/venv/bin/python3," $NAME.py > $BINARY_DIR/$NAME || exit 1
+chmod +x $BINARY_DIR/$NAME || exit 1