Skip to content

Commit

Permalink
Update modules (ivan-hc#1170)
Browse files Browse the repository at this point in the history
...remove final spaces
  • Loading branch information
ivan-hc authored Nov 30, 2024
1 parent 1da1212 commit 101b71c
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
8 changes: 4 additions & 4 deletions modules/install.am
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ _check_if_optional_dependences_are_needed() {
script_content=$(curl -Ls "$appimage_bulder_script")
if echo "$script_content" | grep -ie "appimagetool\|pkg2appimage" 1>/dev/null; then
if ! command -v convert >/dev/null 2>&1; then
echo " 💀 ERROR: cannot create \"$arg\" without \"convert\" (from \"imagemagick\")"
echo " 💀 ERROR: cannot create \"$arg\" without \"convert\" (from \"imagemagick\")"
return 1
fi
fi
else
echo " 💀 ERROR: cannot create \"$arg\", the builder does not exists"
echo " 💀 ERROR: cannot create \"$arg\", the builder does not exists"
return 1
fi
fi
Expand All @@ -88,7 +88,7 @@ _check_if_optional_dependences_are_needed() {
dependency_name="$name"
[ "$name" = "ar" ] && dependency_name="binutils"
if echo "$script_content" | grep -q "^$name" && ! command -v "$name" >/dev/null 2>&1; then
echo " 💀 ERROR: cannot install \"$arg\" without \"$dependency_name\""
echo " 💀 ERROR: cannot install \"$arg\" without \"$dependency_name\""
return 1
fi
done
Expand All @@ -102,7 +102,7 @@ _check_if_script_installs_a_metapackage() {
$SUDOCMD "$APPSPATH"/"$metapackage"/remove 2> /dev/null
elif [ -d "$APPSPATH"/"$metapackage" ]; then
METAPACKAGE_NAME=$(echo "$metapackage" | tr '[:lower:]' '[:upper:]')
echo "$APPNAME IS PART OF \"$METAPACKAGE_NAME\", ALREADY INSTALLED"
echo "$APPNAME IS PART OF \"$METAPACKAGE_NAME\", ALREADY INSTALLED"
return 1
fi
fi
Expand Down
16 changes: 8 additions & 8 deletions modules/management.am
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ function _overwrite() {
else
printf "\n Please, select a snapshot or press CTRL+C to abort:\n\n"
sleep 1
select d in "$HOME/.am-snapshots/$2"/*; do
test -n "$d" && break
echo ">>> Invalid Selection"
select d in "$HOME/.am-snapshots/$2"/*; do
test -n "$d" && break
echo ">>> Invalid Selection"
done
cp -r --backup=t "$d"/* "$argpath"/
rm -R -f ./tmp "$argpath"/*~
Expand All @@ -90,7 +90,7 @@ function _downgrade_entries_filter() {
function _downgrade() {
# Safety checks
if [ ! -f "$argpath"/AM-updater ]; then
echo " No AM-updater available for \"$2\", cannot detect any URL!"
echo " No AM-updater available for \"$2\", cannot detect any URL!"
return 1
elif [ -f "$argpath"/"$2"-rollback ]; then
cd "$argpath" || return 1
Expand All @@ -111,10 +111,10 @@ function _downgrade() {
echo "You have chosen to roll back \"$2\"."
echo "-----------------------------------------------------------------------"
echo "Select a URL from this menu (read carefully) or press CTRL+C to abort:"
echo "-----------------------------------------------------------------------"
echo "-----------------------------------------------------------------------"
sleep 1
select d in $urls; do
test -n "$d" && break
select d in $urls; do
test -n "$d" && break
echo ">>> Invalid Selection"
done
cp ./AM-updater ./AM-rollback
Expand Down Expand Up @@ -243,7 +243,7 @@ function _nolibfuse() {
target="$(echo "${2}" | tr '[:lower:]' '[:upper:]')"
# safety checks
if ! cd "$argpath" 2>/dev/null; then
echo " ⚠️ Error: \"$target\" is NOT installed."
echo " ⚠️ Error: \"$target\" is NOT installed."
return 1
fi
string="$(strings -d "./$2" 2>/dev/null)"
Expand Down
8 changes: 4 additions & 4 deletions modules/sandboxes.am
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ _config() {
_disable_sandbox() {
TARGET="$(command -v "$1")"
if ! grep "aisap-am sandboxing script" "$TARGET" >/dev/null 2>&1; then
echo " ERROR: Not a sandboxed AppImage, aborting"
echo " ERROR: Not a sandboxed AppImage, aborting"
return 1
fi
"$1" --disable-sandbox
Expand All @@ -71,7 +71,7 @@ _check_aisap() {
return 1
fi
"$AMCLIPATH" -i aisap >/dev/null 2>&1
command -v aisap 1>/dev/null || return 1
command -v aisap 1>/dev/null || return 1
echo " aisap installed successfully!"
fi
if grep "aisap-am" "$TARGET" >/dev/null 2>&1; then
Expand Down Expand Up @@ -122,7 +122,7 @@ _generate_sandbox_script() {
VIDEOS="${VIDEOS:-~/Videos}"
# Try find the right name of the app conf/data dir
APPDATA=$( ls "$DATADIR" | grep -i "$APPNAME" | head -1 )
APPCONF=$( ls "$CONFIGDIR" | grep -i "$APPNAME" | head -1 )
APPCONF=$( ls "$CONFIGDIR" | grep -i "$APPNAME" | head -1 )
# Disable sandbox
if [ "$1" = "--disable-sandbox" ]; then
APPIMAGEDIR="${APPEXEC%/*}"
Expand Down Expand Up @@ -204,7 +204,7 @@ _configure_dirs_access() {
'$HOME'|'$HOME/'|"$HOME"|"$HOME/"|"/"|"~"|"~/"|"/home"|"/home/"|\
"$DATADIR"|'$XDG_DATA_HOME'|"$CONFIGDIR"|'$XDG_CONFIG_HOME'|"$BINDIR")
notify-send -u critical "DO YOU WANT THE FBI TO GET YA?"
printf '\033[31m\n'
printf '\033[31m\n'
read -r -p " SPOOKY LOCATION! ARE YOU SURE? IF SO TYPE \"YES\": " YES
[ "$YES" != "YES" ] && echo " That's not \"YES\", aborting" && return 1
;;
Expand Down
20 changes: 10 additions & 10 deletions modules/template.am
Original file line number Diff line number Diff line change
Expand Up @@ -160,16 +160,16 @@ function _template_desktop_file_select_category() {
read -r -p " CHOOSE A CATEGORY : " response
case "$response" in
0) sed -i "s/YOURCATEGORY/AudioVideo/g" ./am-scripts/"$ARCH"/"$arg";;
1) sed -i "s/YOURCATEGORY/Audio/g" ./am-scripts/"$ARCH"/"$arg";;
2) sed -i "s/YOURCATEGORY/Video/g" ./am-scripts/"$ARCH"/"$arg";;
1) sed -i "s/YOURCATEGORY/Audio/g" ./am-scripts/"$ARCH"/"$arg";;
2) sed -i "s/YOURCATEGORY/Video/g" ./am-scripts/"$ARCH"/"$arg";;
3) sed -i "s/YOURCATEGORY/Development/g" ./am-scripts/"$ARCH"/"$arg";;
4) sed -i "s/YOURCATEGORY/Education/g" ./am-scripts/"$ARCH"/"$arg";;
5) sed -i "s/YOURCATEGORY/Game/g" ./am-scripts/"$ARCH"/"$arg";;
6) sed -i "s/YOURCATEGORY/Graphics/g" ./am-scripts/"$ARCH"/"$arg";;
4) sed -i "s/YOURCATEGORY/Education/g" ./am-scripts/"$ARCH"/"$arg";;
5) sed -i "s/YOURCATEGORY/Game/g" ./am-scripts/"$ARCH"/"$arg";;
6) sed -i "s/YOURCATEGORY/Graphics/g" ./am-scripts/"$ARCH"/"$arg";;
7) sed -i "s/YOURCATEGORY/Network/g" ./am-scripts/"$ARCH"/"$arg";;
8) sed -i "s/YOURCATEGORY/Office/g" ./am-scripts/"$ARCH"/"$arg";;
9) sed -i "s/YOURCATEGORY/Science/g" ./am-scripts/"$ARCH"/"$arg";;
10) sed -i "s/YOURCATEGORY/Settings/g" ./am-scripts/"$ARCH"/"$arg";;
8) sed -i "s/YOURCATEGORY/Office/g" ./am-scripts/"$ARCH"/"$arg";;
9) sed -i "s/YOURCATEGORY/Science/g" ./am-scripts/"$ARCH"/"$arg";;
10) sed -i "s/YOURCATEGORY/Settings/g" ./am-scripts/"$ARCH"/"$arg";;
11) sed -i "s/YOURCATEGORY/System/g" ./am-scripts/"$ARCH"/"$arg";;
12|*) sed -i "s/YOURCATEGORY/Utility/g" ./am-scripts/"$ARCH"/"$arg";;
esac
Expand Down Expand Up @@ -364,7 +364,7 @@ for arg in $ARGS; do
echo " Create a template for \"$arg\"" | tr '[:lower:]' '[:upper:]'
echo ""
echo "$DIVIDING_LINE"
echo ""
echo ""
echo " EACH MODEL IS BASED ON A DIFFERENT METHOD OF BUILDING/UPDATING THE PROGRAM."
echo ""
echo " PLEASE, SELECT A TEMPLATE FOR \"$(echo "$arg" | tr '[:lower:]' '[:upper:]')\":"
Expand Down Expand Up @@ -498,7 +498,7 @@ for arg in $ARGS; do
*)
sed -i "s#MYWEBSITE#$RESPONSE#g" ./am-scripts/"$ARCH"/"$arg"; sed -i "s#MYWEBSITE#$RESPONSE#g" ./am-scripts/portable-linux-apps.github.io/apps/"$arg".md
;;
esac
esac
echo "$DIVIDING_LINE"
# ENTER THE URL OF THE ICON THAT WILL APPEAR IN THE MENU
read -r -ep " ◆ COPY/PASTE THE URL OF THE ICON HERE $(echo -e '\n URL: ')" RESPONSE
Expand Down

0 comments on commit 101b71c

Please sign in to comment.