Difference between revisions of "User:Colin"

From AMule Project FAQ
Jump to: navigation, search
(awk ver)
(=amuleCVSfx=)
Line 15: Line 15:
 
== amuleCVSfx ==
 
== amuleCVSfx ==
  
Here is a simple script to remove the obligatory command-line parameter you need to use to run aMule CVS:
+
Here is a simple script to remove the obligatory command-line parameter you need to use to run aMule CV. Run it in the ../amule-cvs directory. It will make a backup of the original file.
  
 
<pre>
 
<pre>
 
#!/bin/bash
 
#!/bin/bash
#
 
# This script removes from the source code the arbitrary command-line parameter
 
# required to launch aMule CVS.
 
# Run it in the ../amule-cvs directory. It will make a backup of the original file.
 
#
 
 
FileIn=src/amule.cpp
 
FileIn=src/amule.cpp
 
FileOut=_^$$.tmp
 
FileOut=_^$$.tmp
Line 36: Line 31:
 
         $0 = "// " $0
 
         $0 = "// " $0
 
         n--
 
         n--
}
+
        }
 
{print}'
 
{print}'
 
mv -f $FileIn $FileIn~  2>&1
 
mv -f $FileIn $FileIn~  2>&1

Revision as of 04:23, 22 December 2006

Satisfied amule user since September 2004.


I am also known as ezeltje in the forum (ezel means "mule" in Dutch, in case anyone is wondering).

Things I have done there:

  • created the Events pages with the example script
  • reorganized AMuleWeb and rewrote the intro
  • expanded AMuleCMD

and other smaller fixes elsewhere...

---

amuleCVSfx

Here is a simple script to remove the obligatory command-line parameter you need to use to run aMule CV. Run it in the ../amule-cvs directory. It will make a backup of the original file.

#!/bin/bash
FileIn=src/amule.cpp
FileOut=_^$$.tmp
[ -e $FileOut ] && rm -f $FileOut
awk < "$FileIn" > "$FileOut" '	
	Found < 1 && /.!cmdline\.Found/ {
        n = 4
	print "//      ------ Commented out by amuleCVSfx ------"
	Found = 1
  	}
	n > 0 {
        $0 = "// " $0
        n--	
        }
{print}'
mv -f $FileIn $FileIn~  2>&1
mv -f $FileOut $FileIn  2>&1
# end

You can view the changes with this command:

$ diff -b --side-by-side --suppress-common-lines src/amule.cpp src/amule.cpp~