Synched gist at Wed Jul 24 17:05:20 PDT 2024
This commit is contained in:
parent
3c45008b43
commit
8729c0dd9a
1 changed files with 36 additions and 0 deletions
36
element-update
Executable file
36
element-update
Executable file
|
@ -0,0 +1,36 @@
|
|||
#!/bin/sh
|
||||
|
||||
mkdir -p ~/Apps/Element.app/Resources
|
||||
cd ~/Apps/Element.app
|
||||
|
||||
# create icon
|
||||
wget -nc https://element.io/images/logo-mark-primary.svg
|
||||
convert -resize 48x48 logo-mark-primary.svg Element.tiff
|
||||
|
||||
# create resource plist
|
||||
printf "{\n" > Resources/Info-gnustep.plist
|
||||
printf " NSExecutable = \"Element\";\n" >> Resources/Info-gnustep.plist
|
||||
printf " NSIcon = \"Element.tiff\";\n" >> Resources/Info-gnustep.plist
|
||||
printf " XAppWrapper = YES;\n" >> Resources/Info-gnustep.plist
|
||||
printf "}\n" >> Resources/Info-gnustep.plist
|
||||
|
||||
# create launcher
|
||||
printf '#!/bin/sh\n' > Element
|
||||
printf 'CURRENT_DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n' >> Element
|
||||
printf '${CURRENT_DIR}/element-desktop-nightly-latest/element-desktop-nightly &\n' >> Element
|
||||
chmod +x Element
|
||||
|
||||
OLD_DIR=$(find -name "element-desktop-nightly-*" -type d)
|
||||
|
||||
if [ ! -z "$OLD_DIR" ]
|
||||
then
|
||||
rm -rf "$OLD_DIR"
|
||||
fi
|
||||
|
||||
wget https://packages.element.io/nightly/install/linux/glibc-x86-64/element-desktop-nightly.tar.gz
|
||||
|
||||
tar xvf element-desktop-nightly.tar.gz
|
||||
rm element-desktop-nightly.tar.gz
|
||||
|
||||
NEW_DIR=$(find -name "element-desktop-nightly-*" -type d)
|
||||
mv "$NEW_DIR" "./element-desktop-nightly-latest"
|
Loading…
Reference in a new issue