From 2310e7ed195bcd08a1143dbb6a30db7bfad99d7d Mon Sep 17 00:00:00 2001 From: VIsualXcc <154101139+VIsualXcc@users.noreply.github.com> Date: Sat, 17 Aug 2024 16:59:51 +0200 Subject: [PATCH] =?UTF-8?q?Setup=20komplett=20und=20bereit=20f=C3=BCr=20de?= =?UTF-8?q?n=20Einsatz?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .DS_Store | Bin 0 -> 6148 bytes firsttest.py | 8 +++++ script/install-rye.sh | 82 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 .DS_Store create mode 100644 firsttest.py create mode 100755 script/install-rye.sh diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..0dc6e8f98b55f6b60f5449ea593ac8bd136fa3dc GIT binary patch literal 6148 zcmeHLJx{|h5PgOKEeNS2Y*}CfsT*TJK}bwUoe)cDi&~_HlzzaPjUBOpm>C%O6|gX} zFfp+q0TMreJKLppn=m3kKFNNL@6LXCPU5-%#9FUb1PTChR2aQ!s#1*oTt;k6_skIr z9-~<=ma1{o8i{lrP64ODZ&ZNaT@TBsV;^1X{axICGJR1ThLvVqp}ySaMs#wxa=U8# zYv1}?4ddGoyiqEq`tzcJ9xB%C@IFQ(Ob+v#_pb+v!_YWUJYbR?W$}UE=W~P(s)$j; zp3P_cO7k%yOg`e;;$uY(_+&?=@X4c%J+#oIwW(qk-62li(lc>Ni86Ve-o0P;luoIU z18(0(TKpz%Sg%Q`Rh!tghMpbF=7;?zr|HL+vtz}{8pB+ODplwshEVC$@9VfgW1>){L+HbY&@&5tLJ@Ly z8sC@U5P?EhI|ZBqwgThovcUWQdiMF>PI6aH0jI#fQb2fNDO{sl(tGR3&GBCAQz=tn q /dev/null; then + echo "error: you do not have 'curl' installed which is required for this script." + exit 1 +fi + +if ! hash gunzip 2> /dev/null; then + echo "error: you do not have 'gunzip' installed which is required for this script." + exit 1 +fi + +TEMP_FILE=`mktemp "${TMPDIR:-/tmp}/.ryeinstall.XXXXXXXX"` +TEMP_FILE_GZ="${TEMP_FILE}.gz" + +cleanup() { + rm -f "$TEMP_FILE" + rm -f "$TEMP_FILE_GZ" +} + +trap cleanup EXIT +HTTP_CODE=$(curl -SL --progress-bar "$DOWNLOAD_URL" --output "$TEMP_FILE_GZ" --write-out "%{http_code}") +if [[ ${HTTP_CODE} -lt 200 || ${HTTP_CODE} -gt 299 ]]; then + echo "error: platform ${PLATFORM} (${ARCH}) is unsupported." + exit 1 +fi + +rm -f "$TEMP_FILE" +gunzip "$TEMP_FILE_GZ" +chmod +x "$TEMP_FILE" + +# Detect when the file cannot be executed due to NOEXEC /tmp. Taken from rustup +# https://github.com/rust-lang/rustup/blob/87fa15d13e3778733d5d66058e5de4309c27317b/rustup-init.sh#L158-L159 +if [ ! -x "$TEMP_FILE" ]; then + printf '%s\n' "Cannot execute $TEMP_FILE (likely because of mounting /tmp as noexec)." 1>&2 + printf '%s\n' "Please copy the file to a location where you can execute binaries and run it manually." 1>&2 + exit 1 +fi + +"$TEMP_FILE" self install $INSTALL_OPTION + +}; __wrap__