Closed Samueru-sama closed 4 months ago
@ivan-hc I'm testing cpu-x again because the dev said to have fixed the issue, but it doesn't look like it works ðŸ˜
have you tried to use the whole path?
I'm testing this ar appman in normal mode, no issue here
I'm testing this ar appman in normal mode, no issue here
The issue happens when I give it a relative path instead of a full path:
But it only happens the first time after I give it the ./cpu-x.sh
the second time it does pick up the file.
(btw that ln error in the screenshot is because I removed the cpu-x directory instead of running am -r
)
what if you name it cpu-x instead of cpu-x.sh?
what if you name it cpu-x instead of cpu-x.sh?
It will pull the cpu-x
script from the database instead of using the local one.
This is why I ran into this issue with mpv back then: https://github.com/ivan-hc/AM/pull/605
The icons dir wasn't being created because it was pulling the script with the issue from the database instead of using the local one that already had the mkdir /opt/"$APP"/icons
How does am -i
know when to use a local file vs pulling from the repo?
# Various cases that may occur during installation (for example if you use a third-party repository)
if test -f $APPSPATH/$arg/remove; then
echo " â—† $(echo '"'$arg'"' | tr a-z A-Z): app already installed previously! Try removing it."
else
if test -f ./$arg 2> /dev/null; then
mkdir -p "$AMCACHEDIR"/tmp; cp ./$arg "$AMCACHEDIR"/tmp/$arg; cd "$AMCACHEDIR" || return; mv ./tmp/$arg ./$arg; rmdir ./tmp
_install_arg
elif test -f $arg 2> /dev/null; then
path2arg=$(echo "$arg")
arg=$(echo "$path2arg" | sed 's:.*/::')
cd "$AMCACHEDIR" || return; mkdir -p tmp; cd tmp || return; cp $path2arg ./$arg; cd ..; mv ./tmp/$arg ./$arg; rmdir ./tmp
_install_arg
elif test -f "$AMPATH/neodb"; then
rm -R -f "$AMCACHEDIR/multirepo-args"
MULTIREPO=$(cat "$AMPATH/neodb" | grep "Source=" | sed 's/Source=//g')
for anyrepo in $MULTIREPO; do
if curl --output /dev/null --silent --head --fail $anyrepo/$arg 1>/dev/null; then
echo "$anyrepo" >> "$AMCACHEDIR/multirepo-args"
fi
done
if test -f "$AMCACHEDIR/multirepo-args"; then
anyrepoargs=$(cat "$AMCACHEDIR/multirepo-args" 2>/dev/null | wc -l)
if [ $anyrepoargs -gt 0 ]; then
if curl --output /dev/null --silent --head --fail $APPSDB/$arg 1>/dev/null; then
echo "$APPSDB" >> "$AMCACHEDIR/multirepo-args"
fi
anyrepoargall=$(cat "$AMCACHEDIR/multirepo-args" 2>/dev/null | wc -l)
if [ $anyrepoargall == 1 ]; then
cd "$AMCACHEDIR" || return; mkdir -p tmp; cd tmp || return; wget -q "$(cat "$AMCACHEDIR/multirepo-args" | head -1)/$arg"; cd ..; mv ./tmp/$arg ./$arg; rmdir ./tmp
rm -R -f "$AMCACHEDIR/multirepo-args"
_install_arg
else
echo -e "\n â—† FOUND $(echo '"'$arg'"' | tr a-z A-Z) FROM MULTIPLE SOURCES:\n" &&
printf " Select a URL from this menu (read carefully) or press CTRL+C to abort:\n\n"; sleep 1;
select d in $(cat "$AMCACHEDIR/multirepo-args"); do test -n "$d" && break; echo ">>> Invalid Selection"; done
cd "$AMCACHEDIR" || return; mkdir -p tmp; cd tmp || return; wget -q "$d/$arg"; cd ..; mv ./tmp/$arg ./$arg; rmdir ./tmp
rm -R -f "$AMCACHEDIR/multirepo-args"
_install_arg
fi
elif curl --output /dev/null --silent --head --fail $APPSDB/$arg 1>/dev/null; then
cd "$AMCACHEDIR" || return; mkdir -p tmp; cd tmp || return; wget -q $APPSDB/$arg; cd ..; mv ./tmp/$arg ./$arg; rmdir ./tmp
rm -R -f "$AMCACHEDIR/multirepo-args"
_install_arg
else
echo ' 💀 ERROR: "'$arg'" does NOT exist in the database, see "'$AMCLI' -l"'
fi
elif curl --output /dev/null --silent --head --fail $APPSDB/$arg 1>/dev/null; then
cd "$AMCACHEDIR" || return; mkdir -p tmp; cd tmp || return; wget -q $APPSDB/$arg; cd ..; mv ./tmp/$arg ./$arg; rmdir ./tmp
_install_arg
else
echo ' 💀 ERROR: "'$arg'" does NOT exist in the database, see "'$AMCLI' -l"'
fi
elif curl --output /dev/null --silent --head --fail $APPSDB/$arg 1>/dev/null; then
cd "$AMCACHEDIR" || return; mkdir -p tmp; cd tmp || return; wget -q $APPSDB/$arg; cd ..; mv ./tmp/$arg ./$arg; rmdir ./tmp
_install_arg
else
echo ' 💀 ERROR: "'$arg'" does NOT exist in the database, see "'$AMCLI' -l"'
fi
fi
it should work exactly as first choice
# Various cases that may occur during installation (for example if you use a third-party repository)
if test -f $APPSPATH/$arg/remove; then
echo " â—† $(echo '"'$arg'"' | tr a-z A-Z): app already installed previously! Try removing it."
else
if test -f ./$arg 2> /dev/null; then
mkdir -p "$AMCACHEDIR"/tmp; cp ./$arg "$AMCACHEDIR"/tmp/$arg; cd "$AMCACHEDIR" || return; mv ./tmp/$arg ./$arg; rmdir ./tmp
_install_arg
I really don't know why this happens then:
I thought that the issue was that I was using ./cpu-x.sh
and am interpreted that as ././cpu-x.sh
so I tested just putting cpu-x.sh
without the ./
and it still fails the first time for some reason.
Alright I began testing all the releases from the last 2 weeks.
So I removed appman and replaced it for version 6.7 and up.
After I did this the issue no longer happens, even with the latest version 💀 so likely I fucked some module, or something got borked when appman updated back then.
I'll be closing this, hopefully the issue doesn't show up again.
Reopening this.
I took this screenshot when I was editing the brave scripts:
brave? were they not ok?
It happens with any script:
I add the .sh
because otherwise am will pull the existing script instead of the local one.
I cannot reproduce the issue... also I see that "AM" suggests appman -l
, so I supposed you were working in AppMan Mode... but I can't see the message
This is ./adb.sh installed with normal AM
and this is AM in AppMan mode
I've no ideaon why this happens to you.
I'm not sure on why all tests in the PR are a failure, however to drag/drop the script always works in this case.
I think I give up this time.
Thats ok, I will have a look at how the whole install module works
if not to solve this issue, function will help to understand more how this module works.
@Samueru-sama a tip: since the module uses the "select" command, SHELL have not an alternative for that.
This is why this, but also the script to install "wine" are BASH scripts.
Hey, this is an issue that I've noticed has been happening ever since I made the mpv appimage:
Sometimes am tires to pull from the database instead of using the script I'm telling it use, if I didn't rename the script to have the
.sh
at the end of the name, it would have used the existingcpu-x
script on the database instead of the local one that I'm telling it to use.(am is appman btw).