Simplify how the chia symlink is created in the CLI .deb (#11188)

This commit is contained in:
Chris Marslender 2022-04-15 14:13:00 -05:00 committed by GitHub
parent 511c13e632
commit 82c01ff2bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 13 deletions

View File

@ -1,5 +0,0 @@
#!/bin/sh
set -e
ln -s /opt/chia/chia /usr/local/bin/chia

View File

@ -1,5 +0,0 @@
#!/bin/sh
set -e
unlink /usr/local/bin/chia

View File

@ -49,12 +49,11 @@ fi
pip install j2cli
CLI_DEB_BASE="chia-blockchain-cli_$CHIA_INSTALLER_VERSION-1_$PLATFORM"
mkdir -p "dist/$CLI_DEB_BASE/opt/chia"
mkdir -p "dist/$CLI_DEB_BASE/usr/bin"
mkdir -p "dist/$CLI_DEB_BASE/DEBIAN"
j2 -o "dist/$CLI_DEB_BASE/DEBIAN/control" assets/deb/control.j2
cp assets/deb/postinst "dist/$CLI_DEB_BASE/DEBIAN/postinst"
cp assets/deb/prerm "dist/$CLI_DEB_BASE/DEBIAN/prerm"
chmod 0755 "dist/$CLI_DEB_BASE/DEBIAN/postinst" "dist/$CLI_DEB_BASE/DEBIAN/prerm"
cp -r dist/daemon/* "dist/$CLI_DEB_BASE/opt/chia/"
ln -s ../../opt/chia/chia "dist/$CLI_DEB_BASE/usr/bin/chia"
dpkg-deb --build --root-owner-group "dist/$CLI_DEB_BASE"
# CLI only .deb done