File tree 2 files changed +10
-4
lines changed
2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -6,4 +6,7 @@ export LC_ALL=C
6
6
source /common.sh
7
7
install_cleanup_trap
8
8
9
- sudo -u pi /home/pi/oprint/bin/pip install -U OctoPrint
9
+ OCTOPI_OPT_FOLDER=/opt/octopi
10
+ OCTOPI_OCTOPRINT_FOLDER="${OCTOPI_OPT_FOLDER}"/oprint
11
+ PIP="${OCTOPI_OCTOPRINT_FOLDER}"/bin/pip
12
+ sudo -u pi "${PIP}" install -U OctoPrint
Original file line number Diff line number Diff line change @@ -27,7 +27,10 @@ install_cleanup_trap
27
27
# Install Klipper
28
28
apt-get -y --allow-downgrades --allow-remove-essential --allow-change-held-packages install virtualenv python3 python3-dev libffi-dev build-essential libncurses-dev libusb-dev avrdude gcc-avr binutils-avr avr-libc stm32flash dfu-util libnewlib-arm-none-eabi gcc-arm-none-eabi binutils-arm-none-eabi libusb-1.0
29
29
30
- pushd /home/pi
30
+ OCTOPI_OPT_FOLDER=/opt/octopi
31
+ OCTOPI_OCTOPRINT_FOLDER=" ${OCTOPI_OPT_FOLDER} " /oprint
32
+ PIP=" ${OCTOPI_OCTOPRINT_FOLDER} " /bin/pip
33
+ pushd " ${OCTOPI_OPT_FOLDER} "
31
34
# Mostly taken from klipper/scripts/install-octopi.sh
32
35
sudo -u pi git clone -b " $KLIPPER_BRANCH " --depth $KLIPPER_DEPTH " $KLIPPER_REPO " klipper
33
36
sudo -u pi virtualenv -p python3 klippy-env
@@ -46,7 +49,7 @@ cp /files/klipper/default /etc/default/klipper
46
49
chmod 644 /etc/default/klipper
47
50
48
51
# Install plugin
49
- sudo -u pi /home/pi/oprint/bin/pip install " ${KLIPPER_OCTOKLIPPER_URL} "
52
+ sudo -u pi " ${PIP} " install " ${KLIPPER_OCTOKLIPPER_URL} "
50
53
51
54
# Merge config
52
- sudo -u pi /home/pi/oprint /bin/python /files/merge-settings.py /files/octoprint/config.yaml /home/pi/.octoprint/config.yaml
55
+ sudo -u pi " ${OCTOPI_OCTOPRINT_FOLDER} " /bin/python /files/merge-settings.py /files/octoprint/config.yaml /home/pi/.octoprint/config.yaml
You can’t perform that action at this time.
0 commit comments