Skip to content

Commit

Permalink
Minor cleanup in the naming, remove double package installs
Browse files Browse the repository at this point in the history
  • Loading branch information
eliasbakken committed Dec 29, 2023
1 parent 46d74a5 commit 9c256ec
Show file tree
Hide file tree
Showing 13 changed files with 43 additions and 262 deletions.
4 changes: 1 addition & 3 deletions armbian/customize-image-barebone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ RELEASE=$1
LINUXFAMILY=$2
BOARD=$3
BUILD_DESKTOP=$4

PREP_PACKAGE_LIST=""
ADD_PACKAGE_LIST="avahi-daemon"

source /tmp/overlay/install_components/add_overlays.sh
source /tmp/overlay/install_components/fix_netplan.sh

post_build() {
echo "ttyGS0" >> /etc/securetty
Expand All @@ -34,7 +33,6 @@ post_build() {
echo "🍰 Rebuild starting..."

add_overlays
fix_netplan
post_build

echo "🍰 Rebuild finished"
11 changes: 4 additions & 7 deletions armbian/customize-image-fluidd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,19 @@ RELEASE=$1
LINUXFAMILY=$2
BOARD=$3
BUILD_DESKTOP=$4
PREP_PACKAGE_LIST="avahi-daemon nginx git unzip \
python3-virtualenv virtualenv python3-dev libffi-dev build-essential \
python3-cffi python3-libxml2 libncurses-dev libusb-dev stm32flash \
libnewlib-arm-none-eabi gcc-arm-none-eabi binutils-arm-none-eabi"
PREP_PACKAGE_LIST="git unzip"
ADD_PACKAGE_LIST="avahi-daemon"

source /tmp/overlay/install_components/klipper.sh
source /tmp/overlay/install_components/moonraker.sh
source /tmp/overlay/install_components/nginx.sh
source /tmp/overlay/install_components/fluidd.sh
source /tmp/overlay/install_components/klipperscreen.sh
source /tmp/overlay/install_components/recore_binaries.sh
source /tmp/overlay/install_components/ustreamer.sh
source /tmp/overlay/install_components/autohotspot.sh
source /tmp/overlay/install_components/prep_install.sh
source /tmp/overlay/install_components/add_overlays.sh
source /tmp/overlay/install_components/fix_netplan.sh
source /tmp/overlay/install_components/post_build.sh

echo "🍰 Rebuild starting..."
Expand All @@ -40,14 +38,13 @@ set -e
prepare_build
install_klipper
install_moonraker "fluidd"
install_nginx "fluidd"
install_fluidd
install_fluidd_nginx
install_klipperscreen
install_ustreamer
install_bins
install_autohotspot
add_overlays
fix_netplan
post_build

systemctl disable [email protected]
Expand Down
12 changes: 4 additions & 8 deletions armbian/customize-image-mainsail.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,37 +16,33 @@ RELEASE=$1
LINUXFAMILY=$2
BOARD=$3
BUILD_DESKTOP=$4
PREP_PACKAGE_LIST="avahi-daemon nginx git unzip \
python3-virtualenv virtualenv python3-dev libffi-dev \
build-essential python3-cffi python3-libxml2 libncurses-dev\
libusb-dev stm32flash libnewlib-arm-none-eabi gcc-arm-none-eabi\
binutils-arm-none-eabi"
PREP_PACKAGE_LIST="git unzip"
ADD_PACKAGE_LIST="avahi-daemon"

source /tmp/overlay/install_components/prep_install.sh
source /tmp/overlay/install_components/klipper.sh
source /tmp/overlay/install_components/moonraker.sh
source /tmp/overlay/install_components/nginx.sh
source /tmp/overlay/install_components/mainsail.sh
source /tmp/overlay/install_components/klipperscreen.sh
source /tmp/overlay/install_components/recore_binaries.sh
source /tmp/overlay/install_components/ustreamer.sh
source /tmp/overlay/install_components/autohotspot.sh
source /tmp/overlay/install_components/post_build.sh
source /tmp/overlay/install_components/add_overlays.sh
source /tmp/overlay/install_components/fix_netplan.sh

set -e
echo "🍰 Rebuild starting..."
prepare_build
install_klipper
install_moonraker "mainsail"
install_nginx "mainsail"
install_mainsail
install_mainsail_nginx
install_klipperscreen
install_ustreamer
install_bins
install_autohotspot
add_overlays
fix_netplan
post_build

echo "🍰 Rebuild finished"
5 changes: 2 additions & 3 deletions armbian/customize-image-octoprint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ RELEASE=$1
LINUXFAMILY=$2
BOARD=$3
BUILD_DESKTOP=$4
PREP_PACKAGE_LIST="avahi-daemon git iptables dnsmasq-base"
PREP_PACKAGE_LIST="git unzip"
ADD_PACKAGE_LIST="avahi-daemon"

source /tmp/overlay/install_components/klipper.sh
source /tmp/overlay/install_components/octoprint.sh
Expand All @@ -26,7 +27,6 @@ source /tmp/overlay/install_components/autohotspot.sh
source /tmp/overlay/install_components/ustreamer.sh
source /tmp/overlay/install_components/prep_install.sh
source /tmp/overlay/install_components/add_overlays.sh
source /tmp/overlay/install_components/fix_netplan.sh
source /tmp/overlay/install_components/post_build.sh

set -e
Expand All @@ -42,7 +42,6 @@ install_ustreamer
install_bins
install_autohotspot
add_overlays
fix_netplan
post_build

echo "🍰 Rebuild finished"
139 changes: 0 additions & 139 deletions userpatches/Dockerfile

This file was deleted.

2 changes: 0 additions & 2 deletions userpatches/README

This file was deleted.

69 changes: 0 additions & 69 deletions userpatches/Vagrantfile

This file was deleted.

2 changes: 1 addition & 1 deletion userpatches/overlay/bins/get-recore-revision
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ REVISION=$(grep Revision "$CONFIG" | cut -d '"' -f 4 | tr '[:upper:]' '[:lower:]

umount /mnt/config
losetup -d "$LODEV"
echo "$REVISION"
echo "$REVISION"
8 changes: 0 additions & 8 deletions userpatches/overlay/install_components/fluidd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,3 @@ install_fluidd(){
chown -R debian:debian fluidd
cp /tmp/overlay/fluidd/fluidd.cfg /home/debian/printer_data/config
}

install_fluidd_nginx(){
cp /tmp/overlay/nginx/upstreams.conf /etc/nginx/conf.d/
cp /tmp/overlay/nginx/common_vars.conf /etc/nginx/conf.d/
cp /tmp/overlay/nginx/fluidd /etc/nginx/sites-available
rm /etc/nginx/sites-enabled/default
ln -s /etc/nginx/sites-available/fluidd /etc/nginx/sites-enabled/fluidd
}
9 changes: 0 additions & 9 deletions userpatches/overlay/install_components/mainsail.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,3 @@ install_mainsail(){
cp /tmp/overlay/mainsail/mainsail.cfg /home/debian/printer_data/config
rm mainsail.zip
}

install_mainsail_nginx(){
echo "🍰 install Nginx"
cp /tmp/overlay/nginx/upstreams.conf /etc/nginx/conf.d/
cp /tmp/overlay/nginx/common_vars.conf /etc/nginx/conf.d/
cp /tmp/overlay/nginx/mainsail /etc/nginx/sites-available
rm /etc/nginx/sites-enabled/default
ln -s /etc/nginx/sites-available/mainsail /etc/nginx/sites-enabled/mainsail
}
12 changes: 12 additions & 0 deletions userpatches/overlay/install_components/nginx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

install_nginx(){
UI=$1
echo "🍰 install Nginx"
apt install -y nginx --no-install-suggests --no-install-recommends
cp /tmp/overlay/nginx/upstreams.conf /etc/nginx/conf.d/
cp /tmp/overlay/nginx/common_vars.conf /etc/nginx/conf.d/
cp /tmp/overlay/nginx/"$UI" /etc/nginx/sites-available
rm /etc/nginx/sites-enabled/default
ln -s /etc/nginx/sites-available/"$UI" /etc/nginx/sites-enabled/"$UI"
}
Loading

0 comments on commit 9c256ec

Please sign in to comment.