Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linux/Bash: Creating Axis2 Web-Profile
Author Message
wuffel
Apprentice
*

Posts: 28
Likes Given: 0
Likes Received: 4 in 2 posts
Joined: Mar 2012
Reputation: 1



Post: #1
Linux/Bash: Creating Axis2 Web-Profile
Hello,
We were struggling a bit to deliver a complete itemlist for Axis2 to all our GameMasters and Players who help creating buildings on a special build-server. Since we dont want share the entire gameserver-logic with the whole world. Smile

So we made this - and it works fine.

File 1 should be a bashfile. Please be aware, that...
- you have to adjust the pathes
- need awk
- need unix2dos
- need axis 2.0.4j

Code:
#!/bin/bash
SCRIPTPATH="/home/of/your/scripts"
awk -f /path/of/srvScriptStrip.awk $SCRIPTPATH/*.scp $SCRIPTPATH/custom/*.scp $SCRIPTPATH/npcs/*.scp $SCRIPTPATH/items/*.scp $SCRIPTPATH/stone/*.scp >output.txt
unix2dos output.txt

Code:
File 2 - srvScriptStrip.awk:
BEGIN{
}
{
$0 = tolower($0)
sub(/^\xef\xbb\xbf/,"")
if (($0 ~ /^\[itemdef/) || ($0 ~ /^id/) || ($0 ~ /^defname/) || ($0 ~ /^\[defname/) || ($0 ~ /^\[typedef/) || ($0 ~ /^\[chardef/) || ($0 ~ /^group/) || ($0 ~ /^p=/) || ($0 ~ /^\[spell/) || ($0 ~ /^\[skill/) || ($0 ~ /^\[areadef/) || ($0 ~ /^category/) || ($0 ~ /^subsection/) || ($0 ~ /^description/) || ($0 ~ /^name/) || ($0 ~ /^dupelist/) || ($0 ~ /^dupeitem/) || ($0 ~ /^\[template/) || ($0 ~ /^\[spawn/) || ($0 ~ /\[itemdef/)){
print($0)
    }
}
(This post was last modified: 05-24-2016 06:51 AM by wuffel.)
05-24-2016 06:48 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 2 users Like wuffel's post
Post Reply 


Messages In This Thread
Linux/Bash: Creating Axis2 Web-Profile - wuffel - 05-24-2016 06:48 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)