Skip to content

Commit

Permalink
Merge pull request #722 from ivan-hc/dev
Browse files Browse the repository at this point in the history
Option "-f" shows sandboxed apps / fix new AM-updater scripts to support "nolibfuse" / enhance "libreoffice" / Add more programs
  • Loading branch information
ivan-hc authored Jun 25, 2024
2 parents 937aa21 + d600213 commit d4180c8
Show file tree
Hide file tree
Showing 76 changed files with 1,178 additions and 793 deletions.
2 changes: 1 addition & 1 deletion APP-MANAGER
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

AMVERSION="6.14-2"
AMVERSION="6.15"

# Determine main repository and branch
AMREPO="https://github.com/ivan-hc/AM/main"
Expand Down
35 changes: 22 additions & 13 deletions modules/files.am
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ _files_sizes() {
}
_files_if_binary_executable() {
echo "$arg | binary/executable" >> "$AMCACHEDIR"/files-type
echo "$arg | binary" >> "$AMCACHEDIR"/files-type
}
_files_if_unknown() {
Expand Down Expand Up @@ -62,10 +62,18 @@ _files_if_script() {
}
_files_if_appimage() {
if [ -z "$(strings -d "./$arg/$arg" 2>/dev/null | grep -F 'AppImages require FUSE to run')" ] 2>/dev/null; then
echo "$arg | appimage-type3" >> "$AMCACHEDIR"/files-type
if ! strings -d "./$arg/$arg" | grep 'AppImages require FUSE to run' >/dev/null 2>&1; then
if grep "aisap-am" "$(command -v "$arg")" >/dev/null 2>&1; then
echo "$arg | appimage3🔒" >> "$AMCACHEDIR"/files-type
else
echo "$arg | appimage3" >> "$AMCACHEDIR"/files-type
fi
else
echo "$arg | appimage-type2" >> "$AMCACHEDIR"/files-type
if grep "aisap-am" "$(command -v "$arg")" >/dev/null 2>&1; then
echo "$arg | appimage2🔒" >> "$AMCACHEDIR"/files-type
else
echo "$arg | appimage2" >> "$AMCACHEDIR"/files-type
fi
fi
}
Expand All @@ -83,7 +91,7 @@ _files_type() {
link_in_path=$(cat "./$arg/remove" | tr " " "\n" | grep 'local/bin' | tail -1)
realpath=$(realpath "$link_in_path")
realstring=$(strings -d "$realpath" 2>/dev/null | head -1 )
if [[ -L "$link_in_path" ]]; then
if [ -L "$link_in_path" ]; then
if echo "$realstring" | grep -q "ld-linux"; then
_files_if_binary_executable
elif echo "$realstring" | grep -q "#!"; then
Expand Down Expand Up @@ -145,9 +153,9 @@ _files() {
INSTALLED_APPS=$(find -name 'remove' -printf "%h\n" 2>/dev/null | du -sh -- * 2>/dev/null | sort -rh | sed 's@.* @@')
for arg in $INSTALLED_APPS; do
if test -f ./$arg/remove 2>/dev/null; then
APPVERSION=$(cat "$AMCACHEDIR"/version-args | grep -w "$arg |" | tr ' ' '\n' | tail -1)
APPTYPE=$(cat "$AMCACHEDIR"/files-type | grep -w "$arg |" | tr ' ' '\n' | tail -1)
APPSYZE=$(cat "$AMCACHEDIR"/files-sizes | grep -w "$arg |" | tr ' ' '\n' | tail -1)
APPVERSION=$(grep -w "$arg |" "$AMCACHEDIR"/version-args | tr ' ' '\n' | tail -1)
APPTYPE=$(grep -w "$arg |" "$AMCACHEDIR"/files-type | tr ' ' '\n' | tail -1)
APPSYZE=$(grep -w "$arg |" "$AMCACHEDIR"/files-sizes | tr ' ' '\n' | tail -1)
echo "$arg | $APPVERSION | $APPTYPE | $APPSYZE" >> "$AMCACHEDIR"/files-args
fi
done
Expand All @@ -160,9 +168,10 @@ _files_show_only_number() {
_files_total_size() {
if [ "$(_files_show_only_number)" = "0" ]; then
printf "\n TOTAL SIZE: $(du -ch $(find -type d -name 'modules' -printf "%h\n") 2>/dev/null | awk 'END {print $1"iB"}' | sed 's/...$/ &/') of disk space in use\n"
printf "\n TOTAL SIZE: $(du -ch $(find -type d -name 'modules' -printf "%h\n") 2>/dev/null | awk 'END {print $1"iB"}' | sed 's/...$/ &/') of disk space in use\n\n"
else
printf "\n TOTAL SIZE: $(du -ch $(find -type f -name 'remove' -printf "%h\n") 2>/dev/null | awk 'END {print $1"iB"}' | sed 's/...$/ &/') of disk space in use\n"
command -v aisap >/dev/null 2>&1 && printf '\n%s\n' " AppImages with 🔒 are sandboxed with aisap"
printf "\n TOTAL SIZE: $(du -ch $(find -type f -name 'remove' -printf "%h\n") 2>/dev/null | awk 'END {print $1"iB"}' | sed 's/...$/ &/') of disk space in use\n\n"
fi
}
Expand All @@ -172,8 +181,8 @@ _files_sort_by_name() {
_files
printf '%s\n' "- APPNAME | VERSION | TYPE | SIZE " >> "$AMCACHEDIR"/files-args-byname
printf '%s\n' "- ------- | ------- | ---- | ----" >> "$AMCACHEDIR"/files-args-byname
cat "$AMCACHEDIR"/files-args 2>/dev/null | sort >> "$AMCACHEDIR"/files-args-byname
cat "$AMCACHEDIR"/files-args-byname | column -t
sort "$AMCACHEDIR"/files-args 2>/dev/null >> "$AMCACHEDIR"/files-args-byname
column -t "$AMCACHEDIR"/files-args-byname
_files_total_size
}
Expand All @@ -184,7 +193,7 @@ _files_sort_by_size() {
printf '%s\n' "- APPNAME | VERSION | TYPE | SIZE " >> "$AMCACHEDIR"/files-args-bysize
printf '%s\n' "- ------- | ------- | ---- | ----" >> "$AMCACHEDIR"/files-args-bysize
cat "$AMCACHEDIR"/files-args >> "$AMCACHEDIR"/files-args-bysize 2>/dev/null
cat "$AMCACHEDIR"/files-args-bysize | column -t
column -t "$AMCACHEDIR"/files-args-bysize
_files_total_size
}
Expand Down
26 changes: 17 additions & 9 deletions programs/x86_64-apps
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
◆ 0ad-latest : Real Time Strategy game of ancient warfare (development branch).
◆ 3d-puzzles : 3D-Puzzles are Rubik, Dogic and Dogic12.
◆ 432hz-player : Because most music is recorded in 440hz (Audio Player).
◆ 7zip : 7-Zip is a file archiver with a high compression ratio.
◆ 86box : Emulator of x86-based machines based on PCem.
◆ aaaaxy : A nonlinear puzzle platformer (game).
◆ abiword : A light and free word processing software.
Expand Down Expand Up @@ -79,6 +80,7 @@
◆ arch-deployer : Script to convert Arch Linux packages to AppDir/AppImage.
◆ arch-flatimage : A hybrid of Flatpak sandboxing with AppImage portability.
◆ archimage-cli : Build AppImage packages using JuNest (Arch Linux).
◆ archimede : Unobtrusive directory information fetcher.
◆ archipelago : Archipelago Multi-Game Randomizer and Server.
◆ archipel : Decentralized archiving and media library system.
◆ arduino-ide : Open-source electronics platform.
Expand Down Expand Up @@ -217,6 +219,7 @@
◆ buho-maui : Easy-to-use note-taking application with “tags” support.
◆ bulkreviewer : Identify, review, and remove private information.
◆ bulkurlopener : Desktop version of the Bulk URL Opener extension.
◆ bunnyfetch : A small and fast tool for getting info about your system.
◆ bunqdesktop : A desktop implementation for the bunq API.
◆ burning-series : Watch any series from Burning Series (Unofficial client).
◆ buttercup : Free and Open Source password vault.
Expand Down Expand Up @@ -400,6 +403,7 @@
◆ deckboard : Control your PC with your phone in easy way possible.
◆ dedop-studio : DeDop Studio
◆ deemix-gui-appimage : A gui electron app for the deemix lib.
◆ deeplx : DeepL Free API (No TOKEN required).
◆ deeptags : Markdown notes manager with support for nested tags.
◆ deerportal : Full of the diamonds board game.
◆ deezer : A linux port of Deezer, allows downloading your songs (music).
Expand Down Expand Up @@ -634,11 +638,13 @@
◆ freac : fre:ac, free audio converter and CD ripper for various encoders.
◆ freecad-assembly3 : Assembly3 workbench for FreeCAD.
◆ freecad : Free and open source AutoCAD alternative.
◆ freefilesync : folder comparison and synchronization software.
◆ freeman : A free, extensible, cross-platform file manager for power users.
◆ freetexturepacker : Creates sprite sheets for you game or site (graphics).
◆ freetube : An Open Source YouTube app for privacy.
◆ freeze : Generate images of code and terminal output.
◆ freezer-appimage : An unofficial client for Deezer.
◆ freshfetch : An alternative to Neofetch in Rust with a focus on customization.
◆ friction : Flexible, user expandable 2D animation software.
◆ friture : Real-time audio visualizations (spectrum, spectrogram, etc.).
◆ fromscratch : Simple autosaving scratchpad.
Expand Down Expand Up @@ -906,6 +912,7 @@
◆ klogg : A smart interactive log explorer.
◆ kmahjongg : Mahjongg game (installs "kdegames").
◆ kmines : Classic mine game (installs "kdegames").
◆ kmon : Linux Kernel Manager and Activity Monitor.
◆ knavalbattle : Battle Ship game (installs "kdegames").
◆ knetwalk : Net constructing game (installs "kdegames").
◆ knights : Chess interface for the KDE Platform (installs "kdegames").
Expand Down Expand Up @@ -943,6 +950,7 @@
◆ lambda-lantern : A 3D game about functional programming patterns.
◆ landrop : Drop any files to any devices on your LAN.
◆ 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.
◆ laravel-kit : Easy Laravel application management.
◆ launcher : Generic application's launcher.
Expand All @@ -967,15 +975,7 @@
◆ libassist : Library Assistant.
◆ libertem : Pixelated scanning transmission electron microscopy.
◆ librecad : 2D CAD program written in C++11 using the Qt framework.
◆ libreoffice : Free and open source Office suite (choose a version).
◆ libreoffice-fresh-full-help : Office suite (includes manuals).
◆ libreoffice-fresh-full : Office suite (latest, includes all languages).
◆ libreoffice-fresh-standard-help : Office suite (includes manuals).
◆ libreoffice-fresh-standard : Office suite (latest, european languages only).
◆ libreoffice-still-full-help : Office suite (includes manuals).
◆ libreoffice-still-full : Office suite (stable, includes all languages).
◆ libreoffice-still-standard-help : Office suite (includes manuals).
◆ libreoffice-still-standard : Office suite (stable, european languages only).
◆ libreoffice : Free and powerful office suite, and a successor to OpenOffice.
◆ librepcb : Design Schematics and PCBs.
◆ libresprite : Animated sprite editor & pixel art tool.
◆ librewolf : Firefox-based Web Browser focused on privacy, security, freedom.
Expand Down Expand Up @@ -1018,6 +1018,7 @@
◆ lux : A free open source image and panorama viewer.
◆ lx-music-desktop-appimage : 一个基于electron的音乐软件.
◆ lxtask : A lightweight and desktop-independent task manager.
◆ macchina : A system information frontend with an emphasis on performance.
◆ magento2-upgrade-gui : Magento 2 Upgrade GUI.
◆ magicfountain : A novel and screenwriting program.
◆ makagiga : To-do manager, notepad, RSS reader and much more.
Expand Down Expand Up @@ -1123,6 +1124,7 @@
◆ moyu : An online collaborative api interface management tool.
◆ mozaic : Massive Online Zeus Artificial Intelligence Competition platform.
◆ mp3-tagger-appimage : An Electron app to edit metadata of mp3 files.
◆ mp4grep : CLI for transcribing and searching audio/video files.
◆ mpv : A free, open source, and cross-platform media player.
◆ mqttcute : An advanced desktop MQTT client for binary protocol development.
◆ mqtt-explorer : Explore your message queues.
Expand Down Expand Up @@ -1181,6 +1183,7 @@
◆ niffler : A grin gui wallet.
◆ nightpdf : Dark Mode PDF Reader built using Electron and PDF.js.
◆ nimbus-weather : A beautiful weather app built using the Dark Sky API.
◆ nitch : Incredibly fast system fetch written in nim.
◆ nitrokey : Manage your Nitrokey devices.
◆ nixnote : Use with Evernote to remember everything.
◆ nmeasimulator : NMEA sentence generator utility to broadcast via TCP.
Expand Down Expand Up @@ -1473,6 +1476,7 @@
◆ qradiolink : Multimode SDR transceiver for GNU radio.
◆ qr-code-generator : Create custom QR Codes, resize, save them as PNG image.
◆ qrop : Crop planning and recordkeeping software.
◆ qrscan : Scan a QR code in the terminal using the system camera or an image.
◆ qsdrswr : Qt SWR analyser using an SDR and soapy_power.
◆ qtads : A cross-platform, multimedia interpreter for TADS adventure games.
◆ qtalarm : Alarm clock for Computers.
Expand Down Expand Up @@ -1778,6 +1782,7 @@
◆ synthein : A space ship building and combat game.
◆ synthv1 : An old school polyphonic synthesizer.
◆ szyszka : Szyszka is fast and powerful file renamer.
◆ tabby : A terminal for a more modern age
◆ tablo-tools : Tools to Bulk Delete and Export from Tablo DVR.
◆ tag-editor : Tag Editor (supports MP4, ID3, Vorbis, Opus, FLAC and Matroska).
◆ tagspaces : An offline, open source, document manager with tagging support.
Expand All @@ -1795,6 +1800,7 @@
◆ tesler : The Tesla Sentinel Viewer.
◆ tess : A hackable, simple, rapid and beautiful terminal.
◆ tesseract : Tesseract Open Source OCR Engine AppImage.
◆ testdisk : TestDisk & PhotoRec, tools to recover lost partitions and files.
◆ texmacs : Free scientific text editor, inspired by TeX and GNU Emacs.
◆ texstudio : LaTeX development environment.
◆ textosaurus : Cross-platform text editor based on Qt and Scintilla.
Expand Down Expand Up @@ -1857,6 +1863,7 @@
◆ tt : A simple Time Tracker to stay basic and intuitive.
◆ tts-now : A chinese text-to-speech assistant based on the speech synthesi.
◆ ttth : An electron based desktop app for online services.
◆ ttyper : Terminal-based typing test.
◆ tulip : Large graphs analysis, drawing and visualization framework.
◆ tumblr-downloader-gui : Download Tumblr posts that you liked.
◆ tumblr-scraper : Scrape a Tumblr profile for user uploadede posts.
Expand Down Expand Up @@ -1899,6 +1906,7 @@
◆ upterm : A terminal emulator for the 21st century.
◆ urbanterror : A team-based tactical game shooter based on the Quake 3 Engine.
◆ utilso : Regex Tester, JWT Verify, Image Converter, Format JSON, Decode...
◆ uwufetch : A meme system info tool for Linux, based on nyan/uwu trend.
◆ uyou : This is a todo list with electron.
◆ v2ray-desktop : V2Ray GUI client for Linux.
◆ valentina : Open source pattern-making software.
Expand Down
56 changes: 56 additions & 0 deletions programs/x86_64/7zip
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/bin/sh

# AM INSTALL SCRIPT VERSION 3.
set -u
APP=7zip
SITE="https://www.7-zip.org"

# 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 /usr/local/bin/7zips\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=$(echo "https://www.7-zip.org/$(wget -q https://www.7-zip.org/download.html -O - | tr '"' '\n' | grep "linux-x64.tar.xz" | 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/7zz" "/opt/$APP/7zzs" || exit 1

# LINK TO PATH
ln -s "/opt/$APP/7zz" "/usr/local/bin/$APP"
ln -s "/opt/$APP/7zzs" "/usr/local/bin/7zips"

# SCRIPT TO UPDATE THE PROGRAM
cat >> "/opt/$APP/AM-updater" << 'EOF'
#!/bin/sh
set -u
APP=7zip
SITE="https://www.7-zip.org"
version0=$(cat "/opt/$APP/version")
version=$(echo "https://www.7-zip.org/$(wget -q https://www.7-zip.org/download.html -O - | tr '"' '\n' | grep "linux-x64.tar.xz" | 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/7zz" "/opt/$APP/7zzs" || 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"
4 changes: 2 additions & 2 deletions programs/x86_64/aisap
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ if [ "$version" != "$version0" ] || [ -e /opt/"$APP"/*.zsync ]; then
echo "$version" > ./version
rm -R -f ./*zs-old ./*.part ./tmp ./*~
notify-send "$APP is updated!"
exit 0
else
echo "Update not needed!"
fi
echo "Update not needed!"
EOF
chmod a+x "/opt/$APP/AM-updater"

Expand Down
4 changes: 2 additions & 2 deletions programs/x86_64/aisleriot
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ if [ "$version" != "$version0" ] || [ -e /opt/"$APP"/*.zsync ]; then
echo "$version" > ./version
rm -R -f ./*zs-old ./*.part ./tmp ./*~
notify-send "$APP is updated!"
exit 0
else
echo "Update not needed!"
fi
echo "Update not needed!"
EOF
chmod a+x "/opt/$APP/AM-updater"

Expand Down
4 changes: 2 additions & 2 deletions programs/x86_64/alexandria
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ if [ "$version" != "$version0" ] || [ -e /opt/"$APP"/*.zsync ]; then
echo "$version" > ./version
rm -R -f ./*zs-old ./*.part ./tmp ./*~
notify-send "$APP is updated!"
exit 0
else
echo "Update not needed!"
fi
echo "Update not needed!"
EOF
chmod a+x "/opt/$APP/AM-updater"

Expand Down
4 changes: 2 additions & 2 deletions programs/x86_64/amdgpu_top
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ if [ "$version" != "$version0" ] || [ -e /opt/"$APP"/*.zsync ]; then
echo "$version" > ./version
rm -R -f ./*zs-old ./*.part ./tmp ./*~
notify-send "$APP is updated!"
exit 0
else
echo "Update not needed!"
fi
echo "Update not needed!"
EOF
chmod a+x "/opt/$APP/AM-updater"

Expand Down
4 changes: 2 additions & 2 deletions programs/x86_64/android-tools
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ if [ "$version" != "$version0" ] || [ -e /opt/"$APP"/*.zsync ]; then
echo "$version" > ./version
rm -R -f ./*zs-old ./*.part ./tmp ./*~
notify-send "$APP is updated!"
exit 0
else
echo "Update not needed!"
fi
echo "Update not needed!"
EOF
chmod a+x "/opt/$APP/AM-updater"

Expand Down
4 changes: 2 additions & 2 deletions programs/x86_64/anything-llm
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ if [ "$version" != "$version0" ] || [ -e /opt/"$APP"/*.zsync ]; then
echo "$version" > ./version
rm -R -f ./*zs-old ./*.part ./tmp ./*~
notify-send "$APP is updated!"
exit 0
else
echo "Update not needed!"
fi
echo "Update not needed!"
EOF
chmod a+x "/opt/$APP/AM-updater"

Expand Down
Loading

0 comments on commit d4180c8

Please sign in to comment.