forked from ivan-hc/MS-Edge-appimage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
microsoft-edge-beta
34 lines (26 loc) · 1.46 KB
/
microsoft-edge-beta
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
APP=microsoft-edge
mkdir tmp;
cd tmp;
# DOWNLOADING THE DEPENDENCIES
wget -q "$(wget -q https://api.github.com/repos/probonopd/go-appimage/releases -O - | sed 's/"/ /g; s/ /\n/g' | grep -o 'https.*continuous.*tool.*86_64.*mage$')" -O appimagetool
wget https://raw.githubusercontent.com/ivan-hc/AM-application-manager/main/tools/pkg2appimage
chmod a+x ./appimagetool ./pkg2appimage
# CREATING THE APPIMAGE
echo 'app: '$APP'
ingredients:
package: microsoft-edge-beta
dist: stable
script:
- wget https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-beta/'$(curl -Ls https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-beta/ | grep -Po '(?<=href=")[^"]*' | sort --version-sort | tail -1)'' >> recipe.yml;
./pkg2appimage ./recipe.yml;
cd ..;
cp ./tmp/$APP/$APP.AppDir/usr/share/applications/*.desktop ./tmp/$APP/$APP.AppDir/
mv ./tmp/$APP/$APP.AppDir/opt/microsoft/msedge-beta/* ./tmp/$APP/$APP.AppDir/
rm ./tmp/$APP/$APP.AppDir/AppRun
cp ./tmp/$APP/$APP.AppDir/microsoft-edge-beta ./tmp/$APP/$APP.AppDir/AppRun
cp ./tmp/$APP/$APP.AppDir/*256*png ./tmp/$APP/$APP.AppDir/$APP-beta.png
version=$(exec ./tmp/microsoft-edge/microsoft-edge.AppDir/AppRun --version | grep -Eo "[+-]?[0-9]+([.][0-9]+)?+[+-]?[0-9]+([.][0-9]+)?")
ARCH=x86_64 VERSION=$(./tmp/appimagetool -v | grep -o '[[:digit:]]*') ./tmp/appimagetool -s ./tmp/$APP/$APP.AppDir
mv ./Microsoft_Edge_"(beta)"-*AppImage ./Microsoft_Edge_"(beta)"-$version-x86_64.AppImage
rm -R -f ./tmp