Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/bash
- gamename="minetest_game";
- modsdir="$HOME/.minetest/games/$gamename/mods";
- oIFS="$IFS";
- IFS='
- ';
- for mod in `ls "$modsdir/"`; do
- rdme="";
- [ -f "$modsdir/$mod/readme.txt" ] && rdme="$modsdir/$mod/readme.txt";
- [ -f "$modsdir/$mod/README.txt" ] && rdme="$modsdir/$mod/README.txt";
- [ -f "$modsdir/$mod/README" ] && rdme="$modsdir/$mod/README";
- if [ "$rdme" ]; then
- link="`cat "$rdme" \
- | grep "$mod" \
- | grep 'http' \
- | sed -e 's/.*\(http[^ \t]*\).*/\1/' \
- | head -n 1`";
- echo "$mod: $link";
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement