Actually, the script also could be used on a Win7 PC, provided you install Cygwin from here, and then use the Cygwin setup program to install xsltproc, wget and tr. That may be a bit overkill though, given the size of Cygwin.
Maybe the script could be ported in another script language that allows creating complete runnables for windows?
Latest posts made by karandil
-
RE: Bash script to download haks and overrides
-
RE: Bash script to download haks and overrides
Just so you know, it seems that the script, even though it is using an URL with IP@, still works. I'm not sure if it really gets what it should be getting, though.
-
RE: I miss everyone!
Quite glad to hear you found a job that sounds steady. See you online at some point :)
-
RE: Crashing. Question for Linux users.
I don't have that problem, but I'm not using the same language keyboard layout you do, so it's not surprising. Here's some troubleshooting suggestions:
-
Check your key defaults setup in the game options menu, tilde could be something you don't want.
-
What effect does the tilde key have when you're not playing NWN? It could be the shortkey to a Gnome of KDE command.
-
Are you playing in fullscreen mode, or windowed? Windowed mode behaves strangely on my system. It also fare very poorly when I accidentaly hit the key that minimizes all apps.
-
When you freeze, is it only the game that freezes? The windowing? or the whole comp? You usually can bypass a frozen fullscreen app or desktop by hitting Ctl+Alt+F1 which sends you to a text login, you can then ps your processes and kill the offending nwmain process. On Ububtu/Kubuntu systems, Ctrl-Alt-F7 will then take you back to the desktop so you can see what ended up happening.
-
-
Went mostly unnoticed…
All of you magicians, conjurers, enchanters and other wizards toiling every morning at your spellbook to cram those spells under your pointy hats.
And you, ne'er-do-well loiterers, cowardly scoundrels and assorted clever tricksters.
All drop your hats to Mr John Holbrook "Jack" Vance who passed away last month at his Oakland home, having reached the ripe old age of 95. Yes, he's the one quoted in the very first DMG for inspiring the Wizzard class. -
RE: Bash script to download haks and overrides
For my return after a month of LARP preparations and play, I propose you another script that only downloads what you really need. It requires installing xsltproc on your Linux, using your usual package management tool. The script contains a usage message you can print out with the -h option. It works with default parameters if you run it from your NWN install directory.
#! /bin/bash listurl="http://216.155.133.53/forum/download/player.xml" xslscript=' <xsl:stylesheet xmlns:xsl="http: 1999="" www.w3.org="" xsl="" transform" version="1.0"><xsl:output method="text"><xsl:template match="file"><xsl:value-of select="url"><xsl:text>;</xsl:text> <xsl:value-of select="subfolder"><xsl:text>;</xsl:text> <xsl:value-of select="testfile"><xsl:text>;</xsl:text> <xsl:value-of select="size"><xsl:text>;</xsl:text> <xsl:value-of select="utcmodifieddate"><xsl:text>@</xsl:text> <xsl:template match=" "=""><xsl:apply-templates select=" file"="">'</xsl:apply-templates select="></xsl:template match="></xsl:value-of select="utcmodifieddate"></xsl:value-of select="size"></xsl:value-of select="testfile"></xsl:value-of select="subfolder"></xsl:value-of select="url"></xsl:template match="file"></xsl:output method="text"></xsl:stylesheet xmlns:xsl="http:> usage() { cat << EOF usage: $0 options This script updates the COA haks and overrides on your COA install. It only downloads more recent files. OPTIONS: -h Show this message -n <path> Location of the NWN install (defaults to .) -t <path> Temporary diretory where the downloads are stored (defaults to ./COAFILES) -A Download everything EOF } TMPDIR="./COAFILES" NWNDIR="." DLOAD_ALL=0 while getopts hAn:t: OPTION do case $OPTION in h) usage exit 1 ;; A) DLOAD_ALL=1 ;; n) NWNDIR=$OPTARG ;; t) TMPDIR=$OPTARG ;; ?) usage exit ;; esac done if [ ! -d ${NWNDIR}/hak -o ! -d ${NWNDIR}/override ] ; then echo "${NWNDIR}is not a nwn install directory" exit 1 fi if [ $DLOAD_ALL = 0 ] ; then WGET_OPT="-N" else WGET_OPT="-S" fi LISTFILES=`echo $xslscript | xsltproc - $listurl | tr ' ' '-' ` IFS='@' read -ra FILEINFO <<< "$LISTFILES" for info in ${FILEINFO[@]} ; do IFS=';' read -ra ONEFILE <<< "$info" TESTFILE=$NWNDIR/${ONEFILE[1]}/${ONEFILE[2]} if [ -f "$TESTFILE" ] ; then ACTUALDATE=`stat -c '%Y' $TESTFILE` ACTUALSIZE=`stat -c '%s' $TESTFILE` ACTUALUTC=`date -u +'%Y/%m/%d-%T' -d @$ACTUALDATE` else ACTUALDATE='none' ACTUALSIZE=0 ACTUALUTC='nodate' echo "Not found: $TESTFILE from $info" fi if [ ${ONEFILE[3]} != $ACTUALSIZE -a "${ONEFILE[3]}" != "$ACTUALUTC" ] ; then echo "$TESTFILE is out-of-date" wget ${ONEFILE[0]} 7z x -o$TMPDIR `basename ${ONEFILE[0]}` for file in ${TMPDIR}/* do cp -f $file ${ONEFILE[1]}/`basename $file | tr 'A-Z' 'a-z'` done rm -f `basename ${ONEFILE[0]}` ${TMPDIR}/* else echo "$TESTFILE is up-to-date" fi done
-
RE: Lowbie Quests outside Arabel
There also is an advertisement for the eveningstar wretched wandering quest in the goose.
-
RE: Bash script to download haks and overrides
Thx for the script, works fine for me.
I see you hardcoded the files' URLs, which could be a hassle to maintain. Then I realized the windows downloader doesn't seem to need reinstalling when a new hak is added, which means it manages to find said list somewhere from the CoA site. Anyone has an idea of where that could be? -
RE: Accompanying noobs
At least by playing a game like this your english can only improve too. I had no imagination or creativeness when I started this game. I ran around as green men at first, but Arabel taught me quite a lot.
If you learned your English from Gurm, you did something gurgle :)
-
RE: How to Bypass the Master Server wait time when logging in
For Linux users, the file has the same name and should be modified in the same way, it is found in /etc/hosts and should be edited with super-user privileges.