Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Unnecessary "ADIRS" in the addons.sh #4

Open
Ermiq opened this issue Nov 17, 2021 · 1 comment
Open

Unnecessary "ADIRS" in the addons.sh #4

Ermiq opened this issue Nov 17, 2021 · 1 comment

Comments

@Ermiq
Copy link

Ermiq commented Nov 17, 2021

I'm not sure what is the purpose of this ADIRS:

ADIRS=""
for dir in $(ls -d "$TMPDIR/"*); do
    dir=$(basename "$dir")
    rm -rf "$1/$dir"
    mv -f "$TMPDIR/$dir" "$1/"
    if [[ $ADIRS == "" ]]; then
        ADIRS="$dir"
    else
       ADIRS="$ADIRS|$dir"
    fi
done
# del url name ver dirs
sed -i "s#$line#$AURI $ANAME $RVERS $ADIRS#" "$CWD/addons.txt"

It seems like all it does is fills the addons.txt with tons of unnecessary clutter text. Every line turns into URL, name, version + very very long directories string that seems to be not needed actually.
I removed it, so it looks like this:

for dir in $(ls -d "$TMPDIR/"*); do
    dir=$(basename "$dir")
    rm -rf "$1/$dir"
    mv -f "$TMPDIR/$dir" "$1/"
done
# del url name ver dirs
sed -i "s#$line#$AURI $ANAME $RVERS#" "$CWD/addons.txt"

and my addont.txt now has just what is actually needed: URL, name, version.

@kevinlekiller
Copy link
Owner

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants