Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-hc authored Jun 26, 2024
1 parent d4f77fb commit 93948f5
Show file tree
Hide file tree
Showing 4 changed files with 189 additions and 0 deletions.
3 changes: 3 additions & 0 deletions programs/x86_64-apps
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,7 @@
◆ langly : Manage Laravel json language files.
◆ lan-mouse : Mouse & keyboard sharing via LAN.
◆ lanshare : LAN file transfer app for any kind and size of files and folders.
◆ lapce : Lightning-fast and Powerful Code Editor written in Rust.
◆ laravel-kit : Easy Laravel application management.
◆ launcher : Generic application's launcher.
◆ lbry-desktop : A browser and wallet for LBRY.
Expand Down Expand Up @@ -1173,6 +1174,7 @@
◆ neanes : A scorewriter for notating Byzantine chant in Byzantine notation.
◆ neon : Light wallet for NEO blockchain.
◆ nepaliunicode : An Unicode Converter app for Windows, OS X and Linux.
◆ nerdfetch : A POSIX *nix fetch script using Nerdfonts.
◆ nest-desktop : A web-based GUI application for NEST Simulator.
◆ netbeans : Apache NetBeans installers.
◆ netpad : A cross-platform C# editor and playground.
Expand Down Expand Up @@ -1706,6 +1708,7 @@
◆ spivak : Karaoke player based on GStreamer and Qt5.
◆ spm : A simple CLI package manager written in bash mainly for AppImages.
◆ spotify : A proprietary music streaming service (from Arch User Repository).
◆ spotify-player : A Spotify player in the terminal with full feature parity.
◆ spotify-tui : Spotify for the terminal written in Rust.
◆ spotube : Open source Spotify client that doesn't require Premium.
◆ springboard : Electron-based SpringRTS Launcher app.
Expand Down
82 changes: 82 additions & 0 deletions programs/x86_64/lapce
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
#!/bin/sh

# AM INSTALL SCRIPT VERSION 3.
set -u
APP=lapce
SITE="lapce/lapce"

# CREATE DIRECTORIES AND ADD REMOVER
[ -n "$APP" ] && mkdir -p "/opt/$APP/tmp" "/opt/$APP/icons" && cd "/opt/$APP/tmp" || exit 1
printf "#!/bin/sh\nset -e\nrm -f /usr/local/bin/$APP\nrm -R -f /opt/$APP" > "/opt/$APP/remove"
printf '\n%s' "rm -f /usr/share/applications/AM-$APP.desktop" >> "/opt/$APP/remove"
chmod a+x "/opt/$APP/remove"

# DOWNLOAD AND PREPARE THE APP, $version is also used for updates
version=$(curl -Ls https://api.github.com/repos/lapce/lapce/releases/latest | jq '.' | grep browser_download_url | grep -i linux-amd64.tar.gz | cut -d '"' -f 4 | head -1)
wget "$version" || exit 1
[ -e ./*7z ] && 7z x ./*7z && rm -f ./*7z
[ -e ./*tar.* ] && tar fx ./*tar.* && rm -f ./*tar.*
[ -e ./*zip ] && unzip -qq ./*zip 1>/dev/null && rm -f ./*zip
cd ..
if [ -d ./tmp/* 2>/dev/null ]; then mv ./tmp/*/* ./; else mv ./tmp/* ./"$APP" 2>/dev/null || mv ./tmp/* ./; fi
rm -R -f ./tmp || exit 1
echo "$version" > ./version
chmod a+x "/opt/$APP/$APP" || exit 1

# LINK TO PATH
ln -s "/opt/$APP/$APP" "/usr/local/bin/$APP"

# SCRIPT TO UPDATE THE PROGRAM
cat >> "/opt/$APP/AM-updater" << 'EOF'
#!/bin/sh
set -u
APP=lapce
SITE="lapce/lapce"
version0=$(cat "/opt/$APP/version")
version=$(curl -Ls https://api.github.com/repos/lapce/lapce/releases/latest | jq '.' | grep browser_download_url | grep -i linux-amd64.tar.gz | cut -d '"' -f 4 | head -1)
[ -n "$version" ] || { echo "Error getting link"; exit 1; }
if [ "$version" != "$version0" ]; then
mkdir "/opt/$APP/tmp" && cd "/opt/$APP/tmp" || exit 1
notify-send "A new version of $APP is available, please wait"
wget "$version" || exit 1
[ -e ./*7z ] && 7z x ./*7z && rm -f ./*7z
[ -e ./*tar.* ] && tar fx ./*tar.* && rm -f ./*tar.*
[ -e ./*zip ] && unzip -qq ./*zip 1>/dev/null && rm -f ./*zip
cd ..
if [ -d ./tmp/* 2>/dev/null ]; then mv --backup=t ./tmp/*/* ./; else mv --backup=t ./tmp/* ./"$APP" 2>/dev/null || mv --backup=t ./tmp/* ./; fi
chmod a+x "/opt/$APP/$APP" || exit 1
echo "$version" > ./version
rm -R -f ./tmp ./*~
notify-send "$APP is updated!"
else
echo "Update not needed!"
fi
EOF
chmod a+x "/opt/$APP/AM-updater"

# ICON
mkdir -p icons
wget https://raw.githubusercontent.com/lapce/lapce/master/extra/images/logo.png -O ./icons/"$APP" 2> /dev/null

# LAUNCHER
rm -f /usr/share/applications/AM-"$APP".desktop
echo "[Desktop Entry]
Version=1.0
Type=Application
Name=Lapce
Comment=Lightning-fast and powerful code editor written in Rust
Categories=Development;IDE;
GenericName=Code Editor
StartupWMClass=lapce
Icon=dev.lapce.lapce
Exec=lapce %F
Terminal=false
MimeType=text/plain;inode/directory;
Actions=new-window;
[Desktop Action new-window]
Name=New Window
Exec=lapce --new %F
Icon=/opt/$APP/icons/$APP" >> /usr/share/applications/AM-"$APP".desktop
49 changes: 49 additions & 0 deletions programs/x86_64/nerdfetch
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/bin/sh

# AM INSTALL SCRIPT VERSION 3.
set -u
APP=nerdfetch
SITE="ThatOneCalculator/NerdFetch"

# CREATE DIRECTORIES AND ADD REMOVER
[ -n "$APP" ] && mkdir -p "/opt/$APP/tmp" "/opt/$APP/icons" && cd "/opt/$APP/tmp" || exit 1
printf "#!/bin/sh\nset -e\nrm -f /usr/local/bin/$APP\nrm -R -f /opt/$APP" > "/opt/$APP/remove"
#printf '\n%s' "rm -f /usr/share/applications/AM-$APP.desktop" >> "/opt/$APP/remove"
chmod a+x "/opt/$APP/remove"

# DOWNLOAD AND PREPARE THE APP, $version is also used for updates
version=$(curl -Ls https://api.github.com/repos/ThatOneCalculator/NerdFetch/releases/latest | jq '.' | grep tag | cut -d '"' -f 4 | head -1)
wget https://raw.githubusercontent.com/ThatOneCalculator/NerdFetch/main/nerdfetch || exit 1
cd ..
if [ -d ./tmp/* 2>/dev/null ]; then mv ./tmp/*/* ./; else mv ./tmp/* ./"$APP" 2>/dev/null || mv ./tmp/* ./; fi
rm -R -f ./tmp || exit 1
echo "$version" > ./version
chmod a+x "/opt/$APP/$APP" || exit 1

# LINK TO PATH
ln -s "/opt/$APP/$APP" "/usr/local/bin/$APP"

# SCRIPT TO UPDATE THE PROGRAM
cat >> "/opt/$APP/AM-updater" << 'EOF'
#!/bin/sh
set -u
APP=nerdfetch
SITE="ThatOneCalculator/NerdFetch"
version0=$(cat "/opt/$APP/version")
version=$(curl -Ls https://api.github.com/repos/ThatOneCalculator/NerdFetch/releases/latest | jq '.' | grep tag | cut -d '"' -f 4 | head -1)
[ -n "$version" ] || { echo "Error getting link"; exit 1; }
if [ "$version" != "$version0" ]; then
mkdir "/opt/$APP/tmp" && cd "/opt/$APP/tmp" || exit 1
notify-send "A new version of $APP is available, please wait"
wget https://raw.githubusercontent.com/ThatOneCalculator/NerdFetch/main/nerdfetch || exit 1
cd ..
if [ -d ./tmp/* 2>/dev/null ]; then mv --backup=t ./tmp/*/* ./; else mv --backup=t ./tmp/* ./"$APP" 2>/dev/null || mv --backup=t ./tmp/* ./; fi
chmod a+x "/opt/$APP/$APP" || exit 1
echo "$version" > ./version
rm -R -f ./tmp ./*~
notify-send "$APP is updated!"
else
echo "Update not needed!"
fi
EOF
chmod a+x "/opt/$APP/AM-updater"
55 changes: 55 additions & 0 deletions programs/x86_64/spotify-player
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/bin/sh

# AM INSTALL SCRIPT VERSION 3.
set -u
APP=spotify-player
SITE="aome510/spotify-player"

# CREATE DIRECTORIES AND ADD REMOVER
[ -n "$APP" ] && mkdir -p "/opt/$APP/tmp" "/opt/$APP/icons" && cd "/opt/$APP/tmp" || exit 1
printf "#!/bin/sh\nset -e\nrm -f /usr/local/bin/$APP\nrm -R -f /opt/$APP" > "/opt/$APP/remove"
#printf '\n%s' "rm -f /usr/share/applications/AM-$APP.desktop" >> "/opt/$APP/remove"
chmod a+x "/opt/$APP/remove"

# DOWNLOAD AND PREPARE THE APP, $version is also used for updates
version=$(curl -Ls https://api.github.com/repos/aome510/spotify-player/releases | jq '.' | grep browser_download_url | grep -i x86_64-unknown-linux-gnu.tar.gz | cut -d '"' -f 4 | head -1)
wget "$version" || exit 1
[ -e ./*7z ] && 7z x ./*7z && rm -f ./*7z
[ -e ./*tar.* ] && tar fx ./*tar.* && rm -f ./*tar.*
[ -e ./*zip ] && unzip -qq ./*zip 1>/dev/null && rm -f ./*zip
cd ..
if [ -d ./tmp/* 2>/dev/null ]; then mv ./tmp/*/* ./; else mv ./tmp/* ./"$APP" 2>/dev/null || mv ./tmp/* ./; fi
rm -R -f ./tmp || exit 1
echo "$version" > ./version
chmod a+x "/opt/$APP/$APP" || exit 1

# LINK TO PATH
ln -s "/opt/$APP/$APP" "/usr/local/bin/$APP"

# SCRIPT TO UPDATE THE PROGRAM
cat >> "/opt/$APP/AM-updater" << 'EOF'
#!/bin/sh
set -u
APP=spotify-player
SITE="aome510/spotify-player"
version0=$(cat "/opt/$APP/version")
version=$(curl -Ls https://api.github.com/repos/aome510/spotify-player/releases | jq '.' | grep browser_download_url | grep -i x86_64-unknown-linux-gnu.tar.gz | cut -d '"' -f 4 | head -1)
[ -n "$version" ] || { echo "Error getting link"; exit 1; }
if [ "$version" != "$version0" ]; then
mkdir "/opt/$APP/tmp" && cd "/opt/$APP/tmp" || exit 1
notify-send "A new version of $APP is available, please wait"
wget "$version" || exit 1
[ -e ./*7z ] && 7z x ./*7z && rm -f ./*7z
[ -e ./*tar.* ] && tar fx ./*tar.* && rm -f ./*tar.*
[ -e ./*zip ] && unzip -qq ./*zip 1>/dev/null && rm -f ./*zip
cd ..
if [ -d ./tmp/* 2>/dev/null ]; then mv --backup=t ./tmp/*/* ./; else mv --backup=t ./tmp/* ./"$APP" 2>/dev/null || mv --backup=t ./tmp/* ./; fi
chmod a+x "/opt/$APP/$APP" || exit 1
echo "$version" > ./version
rm -R -f ./tmp ./*~
notify-send "$APP is updated!"
else
echo "Update not needed!"
fi
EOF
chmod a+x "/opt/$APP/AM-updater"

0 comments on commit 93948f5

Please sign in to comment.