-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
pkg/common/duetpimanagementplugin/opt/dsf/plugins/DuetPiManagementPlugin/dsf/install-dsf.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
# Need to have a version number in order to install a specific DSF version... | ||
if [[ -z "$1" ]]; then | ||
echo "Missing version" | ||
exit 1 | ||
fi | ||
VERSION=`echo $1 | sed 's/-/~/g'` | ||
|
||
# Determine the corresponding RRF package version. There may be multiple RRF packages per DSF version | ||
RRF_VERSION=`apt-cache show reprapfirmware | grep "Version:" | cut -d ' ' -f 2 | grep "$VERSION" | head -n 1` | ||
if [[ -z "$RRF_VERSION" ]]; then | ||
echo "Could not find RepRapFirmware package for version $1. Invalid version or wrong package feed?" | ||
exit 1 | ||
fi | ||
|
||
# Install given version | ||
echo "Installing DSF $VERSION and RRF $RRF_VERSION" | ||
apt-get install -y --allow-downgrades -qq -o Dpkg::Options::="--force-confold" duetsoftwareframework=$VERSION duetcontrolserver=$VERSION duetwebserver=$VERSION duetpluginservice=$VERSION duettools=$VERSION duetruntime=$VERSION duetwebcontrol=$VERSION duetpimanagementplugin=$VERSION reprapfirmware=$RRF_VERSION < /dev/null | ||
echo "Done!" | ||
|