init
This commit is contained in:
commit
6d87ac8ba1
139 changed files with 7604 additions and 0 deletions
20
bin/.bin/leapp.sh
Executable file
20
bin/.bin/leapp.sh
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
bin=~/.bin/leapp
|
||||
latest_version_url="https://api.github.com/repos/noovolari/leapp/releases/latest"
|
||||
|
||||
# Function to compare version numbers
|
||||
function version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; }
|
||||
|
||||
# If leapp binary is not found or if there is a newer version, download it
|
||||
if [ ! -f $bin ] || version_gt "$(curl -s $latest_version_url | grep -oP '"tag_name": "\K(.*)(?=")')" "$(basename $bin | grep -oP '\d+\.\d+\.\d+')"; then
|
||||
notify-send -u normal "⏬ Leapp" "Checking for updates..."
|
||||
url="https://asset.noovolari.com/latest/Leapp-appImage.zip"
|
||||
wget -q -O /tmp/leapp.AppImage "$url"
|
||||
unzip /tmp/leapp.AppImage -d /tmp
|
||||
mv /tmp/release/Leapp* $bin
|
||||
chmod +x $bin
|
||||
fi
|
||||
|
||||
# Execute leapp
|
||||
$bin -f -i $1 -o $2
|
Loading…
Add table
Add a link
Reference in a new issue