From d09d7c51b264cfbfd7f77264840a7df6f9af9e4c Mon Sep 17 00:00:00 2001 From: CvH <1355173+CvH@users.noreply.github.com> Date: Sun, 10 Dec 2023 18:18:26 +0100 Subject: [PATCH] pastebinit: use LE paste service --- packages/sysutils/busybox/package.mk | 2 ++ packages/sysutils/busybox/scripts/pastebinit | 8 +++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/sysutils/busybox/package.mk b/packages/sysutils/busybox/package.mk index 6512b146cd..4c51609561 100644 --- a/packages/sysutils/busybox/package.mk +++ b/packages/sysutils/busybox/package.mk @@ -119,6 +119,8 @@ makeinstall_target() { cp ${PKG_DIR}/scripts/apt-get ${INSTALL}/usr/bin/ cp ${PKG_DIR}/scripts/sudo ${INSTALL}/usr/bin/ cp ${PKG_DIR}/scripts/pastebinit ${INSTALL}/usr/bin/ + sed -e "s/@DISTRONAME@-@OS_VERSION@/${DISTRONAME}-$OS_VERSION/g" \ + -i ${INSTALL}/usr/bin/pastebinit ln -sf pastebinit ${INSTALL}/usr/bin/paste cp ${PKG_DIR}/scripts/vfd-clock ${INSTALL}/usr/bin/ diff --git a/packages/sysutils/busybox/scripts/pastebinit b/packages/sysutils/busybox/scripts/pastebinit index 76dec734fd..3824aa6552 100755 --- a/packages/sysutils/busybox/scripts/pastebinit +++ b/packages/sysutils/busybox/scripts/pastebinit @@ -4,8 +4,6 @@ # Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv) # Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv) -if [ -n "${PASTEUSR}" -a "${PASTEPWD}" ]; then - cat "$@" | curl -F 'f:1=<-' ${PASTEUSR}:${PASTEPWD}@ix.io -else - cat "$@" | curl -F 'f:1=<-' http://ix.io -fi +token=$(echo "@DISTRONAME@-@OS_VERSION@" | sha256sum | cut -d ' ' -f 1) + +cat "$@" | curl https://paste.libreelec.tv -F 'file=@-' -H "Authorization: Bearer ${token}"