Skip to content

Commit

Permalink
Add SUSE and bash pipefail
Browse files Browse the repository at this point in the history
  • Loading branch information
xlionjuan committed Oct 13, 2024
1 parent 761a0d8 commit 14b3def
Show file tree
Hide file tree
Showing 9 changed files with 90 additions and 16 deletions.
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

[![Create Repo for RustDesk latest and nightly](https://github.com/xlionjuan/rustdesk-rpm-repo/actions/workflows/create-repo.yml/badge.svg)](https://github.com/xlionjuan/rustdesk-rpm-repo/actions/workflows/create-repo.yml)

[Click me if you're using SUSE](#rustdesk-rpm-suse-repo)

> [!IMPORTANT]
> This is ***unofficial*** [RustDesk](https://github.com/rustdesk/rustdesk/) RPM repo, what I can say is *trust me bro*, it is your decision to trust me or not.
Expand Down Expand Up @@ -66,3 +68,43 @@ to upgrade manually, still better than download manually.

> [!CAUTION]
> Don't asking me to doing this.


# rustdesk-rpm-suse-repo

> [!NOTE]
> Testing
## Architectures
This repo provides two architectures

* `amd64` (x86_64)
* `arm64` (aarch64)

## Import RPM repo
### latest

```bash
curl -fsSl https://xlionjuan.github.io/rustdesk-rpm-repo/latest-suse.repo | sudo tee /etc/zypp/repos.d/xlion-rustdesk-rpm-suse-repo.repo
```

### nightly

```bash
curl -fsSl https://xlionjuan.github.io/rustdesk-rpm-repo/nightly-suse.repo | sudo tee /etc/zypp/repos.d/xlion-rustdesk-rpm-suse-repo.repo
```

## Install/Upgrade RustDesk

```bash
sudo zypper in rustdesk
```

## Update to same version number of nightly

Because RustDesk didn't change its version number or add special identify when releasing nightly, so you could run

```bash
sudo zypper in --force rustdesk
```
5 changes: 5 additions & 0 deletions createrepo-latest.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
#!/bin/bash

set -oue pipefail

# Sign RPM
rpm --addsign wwwroot/latest/*.rpm
rpm --addsign wwwroot/latest-suse/*.rpm

# Create repo
createrepo_c wwwroot/latest
createrepo_c wwwroot/latest-suse

# Sign Repo
gpg --detach-sign --armor wwwroot/latest/repodata/repomd.xml
gpg --detach-sign --armor wwwroot/latest-suse/repodata/repomd.xml
5 changes: 5 additions & 0 deletions createrepo-nightly.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
#!/bin/bash

set -oue pipefail

# Sign RPM
rpm --addsign wwwroot/nightly/*.rpm
rpm --addsign wwwroot/nightly-suse/*.rpm

# Create repo
createrepo_c wwwroot/nightly
createrepo_c wwwroot/nightly-suse

# Sign Repo
gpg --detach-sign --armor wwwroot/nightly/repodata/repomd.xml
gpg --detach-sign --armor wwwroot/nightly-suse/repodata/repomd.xml
16 changes: 8 additions & 8 deletions rustdesk_latest.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -oue pipefail

# Define the repository and the tag you want to fetch
REPO="rustdesk/rustdesk"
#TAG="latest" # Change this to any tag you want
Expand All @@ -17,19 +19,17 @@ fi
# Use jq to parse JSON data and find the asset URL
RUSTDESK_URL_AMD64=$(echo "$RELEASE_DATA" | jq -r '.assets[] | select(.name | contains("x86_64") and endswith(".rpm") and (contains("suse") | not)) | .browser_download_url' | head -n 1)
RUSTDESK_URL_ARM64=$(echo "$RELEASE_DATA" | jq -r '.assets[] | select(.name | contains("aarch64") and endswith(".rpm") and (contains("suse") | not)) | .browser_download_url' | head -n 1)


# Check if the asset URL was found
#if [ -z "$RUSTDESK_URL" ]; then
# echo "No matching file found."
#else
# echo "RUSTDESK_URL=\"$RUSTDESK_URL\""
#fi
RUSTDESK_URL_AMD64_SUSE=$(echo "$RELEASE_DATA" | jq -r '.assets[] | select(.name | contains("x86_64") and endswith(".rpm") and contains("suse")) | .browser_download_url' | head -n 1)
RUSTDESK_URL_ARM64_SUSE=$(echo "$RELEASE_DATA" | jq -r '.assets[] | select(.name | contains("aarch64") and endswith(".rpm") and contains("suse")) | .browser_download_url' | head -n 1)

echo "--------------------RESULT--------------------"
echo "RUSTDESK_URL_AMD64=\"$RUSTDESK_URL_AMD64\""
echo "RUSTDESK_URL_ARM64=\"$RUSTDESK_URL_ARM64\""
echo "RUSTDESK_URL_AMD64=\"$RUSTDESK_URL_AMD64_SUSE\""
echo "RUSTDESK_URL_ARM64=\"$RUSTDESK_URL_ARM64_SUSE\""
echo ""
echo "------------------DOWNLOADING-----------------"
wget -P wwwroot/latest $RUSTDESK_URL_AMD64
wget -P wwwroot/latest $RUSTDESK_URL_ARM64
wget -P wwwroot/latest-suse $RUSTDESK_URL_AMD64_SUSE
wget -P wwwroot/latest-suse $RUSTDESK_URL_ARM64_SUSE
16 changes: 8 additions & 8 deletions rustdesk_nightly.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -oue pipefail

# Define the repository and the tag you want to fetch
REPO="rustdesk/rustdesk"
TAG="nightly" # Change this to any tag you want
Expand All @@ -17,19 +19,17 @@ fi
# Use jq to parse JSON data and find the asset URL
RUSTDESK_URL_AMD64=$(echo "$RELEASE_DATA" | jq -r '.assets[] | select(.name | contains("x86_64") and endswith(".rpm") and (contains("suse") | not)) | .browser_download_url' | head -n 1)
RUSTDESK_URL_ARM64=$(echo "$RELEASE_DATA" | jq -r '.assets[] | select(.name | contains("aarch64") and endswith(".rpm") and (contains("suse") | not)) | .browser_download_url' | head -n 1)


# Check if the asset URL was found
#if [ -z "$RUSTDESK_URL" ]; then
# echo "No matching file found."
#else
# echo "RUSTDESK_URL=\"$RUSTDESK_URL\""
#fi
RUSTDESK_URL_AMD64_SUSE=$(echo "$RELEASE_DATA" | jq -r '.assets[] | select(.name | contains("x86_64") and endswith(".rpm") and contains("suse")) | .browser_download_url' | head -n 1)
RUSTDESK_URL_ARM64_SUSE=$(echo "$RELEASE_DATA" | jq -r '.assets[] | select(.name | contains("aarch64") and endswith(".rpm") and contains("suse")) | .browser_download_url' | head -n 1)

echo "--------------------RESULT--------------------"
echo "RUSTDESK_URL_AMD64=\"$RUSTDESK_URL_AMD64\""
echo "RUSTDESK_URL_ARM64=\"$RUSTDESK_URL_ARM64\""
echo "RUSTDESK_URL_AMD64=\"$RUSTDESK_URL_AMD64_SUSE\""
echo "RUSTDESK_URL_ARM64=\"$RUSTDESK_URL_ARM64_SUSE\""
echo ""
echo "------------------DOWNLOADING-----------------"
wget -P wwwroot/nightly $RUSTDESK_URL_AMD64
wget -P wwwroot/nightly $RUSTDESK_URL_ARM64
wget -P wwwroot/latest-suse $RUSTDESK_URL_AMD64_SUSE
wget -P wwwroot/latest-suse $RUSTDESK_URL_ARM64_SUSE
11 changes: 11 additions & 0 deletions wwwroot/latest-suse.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Two channels available: latest, nightly.
# Switch by edit the string within baseurl.

[xlion-rustdesk-rpm-suse-repo]
name=XLion RustDesk RPM SUSE repo
baseurl=https://xlionjuan.github.io/rustdesk-rpm-repo/latest-suse
enabled=1
autorefresh=1
gpgcheck=1
gpgkey=https://xlionjuan.github.io/rustdesk-rpm-repo/pubkey.gpg

Empty file added wwwroot/latest-suse/.gitkeep
Empty file.
11 changes: 11 additions & 0 deletions wwwroot/nightly-suse.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Two channels available: latest, nightly.
# Switch by edit the string within baseurl.

[xlion-rustdesk-rpm-suse-repo]
name=XLion RustDesk RPM SUSE repo
baseurl=https://xlionjuan.github.io/rustdesk-rpm-repo/nightly-suse
enabled=1
autorefresh=1
gpgcheck=1
gpgkey=https://xlionjuan.github.io/rustdesk-rpm-repo/pubkey.gpg

Empty file added wwwroot/nightly-suse/.gitkeep
Empty file.

0 comments on commit 14b3def

Please sign in to comment.