mirror of
https://github.com/Phantop/dotfiles
synced 2024-11-04 22:14:21 +00:00
17 lines
564 B
Fish
Executable file
17 lines
564 B
Fish
Executable file
# Defined in /tmp/fish.cOeTFi/fruitdl.fish @ line 2
|
|
function fruitdl
|
|
set emu $argv[2]
|
|
cd $D/Games/Emulators/$emu
|
|
set file (wget -O- -o /dev/tty github.com/$emu-emu/$emu-$argv[1]/releases/latest| grep -o -m1 $emu-emu/$emu-$argv[1]/releases/download/$argv[1]-[0-9]\*/$emu-linux-[0-9]\*-[0-9a-f]\* | head -1)
|
|
|
|
if grep $file emuver
|
|
echo "$emu is already updated"
|
|
else
|
|
rm -r $argv[1]
|
|
fastdl https://www.github.com/$file.7z
|
|
7z x (basename $file).7z
|
|
echo $file > emuver
|
|
rm (basename $file).7z
|
|
end
|
|
end
|