ODROID: debian: Add Debian package scripts

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: If859a008e42cf8c0f670de40886e525916ae98ce
This commit is contained in:
Dongjin Kim
2021-01-19 12:39:08 +00:00
committed by YoungSoo Shin
parent c773418da6
commit f7d08a02bb
10 changed files with 126 additions and 0 deletions

22
debian/klipper.postinst vendored Normal file
View File

@@ -0,0 +1,22 @@
#!/bin/sh
KLIPPER_CONFIG_PATH=/etc/klippy_config
DEFAULT_CONFIG=generic-bigtreetech-skr-v1.3.cfg
## Install required Python packages
if [ ! `which pip2` ]; then
curl https://bootstrap.pypa.io/get-pip.py --output /tmp/get-pip.py
python2 /tmp/get-pip.py
fi
/usr/local/bin/pip install -r /usr/share/klipper/klippy-requirements.txt
## Default printer configuration
mkdir -p ${KLIPPER_CONFIG_PATH}
if [ ! -f ${KLIPPER_CONFIG_PATH}/printer.cfg ]; then
ln -s /usr/share/klipper/config/$DEFAULT_CONFIG \
${KLIPPER_CONFIG_PATH}/printer.cfg
fi
#DEBHELPER#