dev: automated commit - 2025-07-16 19:26:06
This commit is contained in:
parent
fb87c567f6
commit
94487551fc
30 changed files with 173 additions and 157 deletions
26
local-bin/.local/bin/openlens.sh
Executable file
26
local-bin/.local/bin/openlens.sh
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
REPO="MuhammedKalkan/OpenLens"
|
||||
BINARY_NAME="openlens"
|
||||
TARGET_DIR="$HOME/.local/bin"
|
||||
BINARY_PATH="$TARGET_DIR/$BINARY_NAME"
|
||||
|
||||
if [ ! -x "$BINARY_PATH" ]; then
|
||||
notify-send "📦 Installing $BINARY_NAME" "Downloading from GitHub repository $REPO..."
|
||||
|
||||
mkdir -p "$TARGET_DIR"
|
||||
|
||||
arch=$(uname -m)
|
||||
filename=$(curl -s "https://api.github.com/repos/$REPO/releases/latest" | jq -r '.assets[].name' | grep "${arch}.AppImage$")
|
||||
fileurl=$(curl -s "https://api.github.com/repos/$REPO/releases/latest" | jq -r --arg filename "$filename" '.assets[] | select(.name == $filename) | .browser_download_url')
|
||||
|
||||
wget -q -O "$BINARY_PATH" "$fileurl" || {
|
||||
notify-send -u critical "Installation Failed" "Failed to download $BINARY_NAME from $REPO"
|
||||
exit 1
|
||||
}
|
||||
|
||||
chmod +x "$BINARY_PATH"
|
||||
|
||||
notify-send "Installation Complete" "$BINARY_NAME has been installed successfully"
|
||||
fi
|
||||
|
||||
exec "$BINARY_PATH" "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue