From dc8f508aa59452761ecd7248661835dd779aa897 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Mon, 1 Feb 2021 15:26:28 +0100 Subject: [PATCH] Made install make a symlink instead --- README.md | 1 + install.sh | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2dfe313..ba82ec8 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ Room-Computer is a simple room controller and is basically a controller for your ### Installation git clone https://github.com/E-Almqvist/roomcomputer.git pip install -r requirements.txt +Then run the installation script `./install.sh`. This script will make a symlink to `/opt/roomcomputer` and link `hue_cmd.py` to `/usr/bin/hue`. ### Setup and Configuration Run the `setup.sh` script in order to copy the necessary files to `~/.config/roomcomputer/`. If you are planning to create a service for the `speech_daemon.py` with systemd; then you can specify its configuration file as the first argument: `speech_daemon.py /path/to/config/config.json`. diff --git a/install.sh b/install.sh index 5e4ca3c..4d4f470 100755 --- a/install.sh +++ b/install.sh @@ -2,11 +2,11 @@ repoPath=$(dirname "$(realpath $0)") -echo Installing roomcomputer at /opt/... -sudo mkdir -p /opt/roomcomputer -sudo cp -r $repoPath /opt/ +echo Creating roomcomputer symlink in /opt/... +sudo ln -s $repoPath /opt/roomcomputer +sudo pip install -r /opt/roomcomputer/requirements.txt -echo Linking binaries to /usr/bin/... +echo Creating hue_cmd.py symlink in /usr/bin/... sudo ln -s /opt/roomcomputer/hue_cmd.py /usr/bin/hue echo Done.