diff --git a/README.md b/README.md index f0ef385..800cd60 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,14 @@ See requirements.txt ### Linux -You can use the Bash script from the cloned folder (it will create a virtual environment for it, and do the installation of requirements), or you can install breaking system packages with: - ```bash -pip install . --break-system-packages +To install for example in your ~/.local/bin folder: +```bash +./install.sh --destination ~/.local/bin +``` + +To install system-wide: +```bash +sudo ./install.sh --destination /usr/local/bin ``` ## Usage diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..8bd4caf --- /dev/null +++ b/install.sh @@ -0,0 +1,24 @@ +#!/bin/bash +destination="/usr/local/bin" +while [ $# -gt 0 ] +do + case "$1" in + "--help"|"-h"|"-?") + usage + exit 0 + ;; + "--destination"|"-d") + shift + destination="${1}" + shift + ;; + *) + echo "Ignoring unknwon parameter '${1}'" + shift + ;; + esac +done + +script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +sed "s#__src_folder__#${script_dir}#g" wrapper.sh > "${destination}/nc_password_client.sh" +chmod +x "${destination}/nc_password_client.sh" diff --git a/wrapper.sh b/wrapper.sh new file mode 100644 index 0000000..4651e89 --- /dev/null +++ b/wrapper.sh @@ -0,0 +1,3 @@ +#!/bin/bash +cd "__src_folder__" || exit 1 +"__src_folder__/nc_password_client.sh" "${@}"