aboutsummaryrefslogtreecommitdiff
path: root/aux-gnurl/sed.sh
blob: 97ad6cf05b4a1afa113ad01ef6493cb270ab14c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh

# TODO: convert to awk script.

S=$HOME/src/gnunet/gnurl

find . ! -path '*.git/*' ! -path '*sed.sh*' -type f -print0 | xargs -0 sed -i 's/<curl\/curl.h>/<gnurl\/curl.h>/g'
echo "'curl/curl.h' -> 'gnurl/curl.h' ... [DONE]"

cd $S/docs
find . ! -path '*.git/*' ! -path '*sed.sh*' -type f -print0 | xargs -0 sed -i 's/TH curl_/TH gnurl_/g'
echo "'TH curl_' -> 'TH gnurl_' ... [DONE]"

find . ! -path '*.git/*' ! -path '*sed.sh*' -type f -print0 | xargs -0 sed -i 's/TH CURL/TH GNURL/g'
echo "'TH CURL' -> 'TH GNURL' ... [DONE]"

find . ! -path '*.git/*' ! -path '*sed.sh*' -type f -print0 | xargs -0 sed -i 's/libcurl Manual/libgnurl Manual/g'
echo "'libcurl Manual' -> 'libgnurl Manual' ... [DONE]"

find . ! -path '*.git/*' ! -path '*sed.sh*' -type f -print0 | xargs -0 sed -i 's/man3\/curl/man3\/gnurl/g'
echo "'man3/curl' -> 'man3/gnurl' ... [DONE]"

# TODO: groff -> mdoc
# find . ! -path '*.git/*' ! -path '*sed.sh*' -type f -print0 | xargs -0 sed -i 's/.SH/.Sh/g'

awk '{ gsub("CURLOPT_","GNURLOPT_",$0); print $0}' libcurl/opts/Makefile.inc > libcurl/opts/Makefile.inc.tmp
mv libcurl/opts/Makefile.inc.tmp libcurl/opts/Makefile.inc
awk '{ gsub("CURLMOPT_","GNURLMOPT_",$0); print $0}' libcurl/opts/Makefile.inc > libcurl/opts/Makefile.inc.tmp
mv libcurl/opts/Makefile.inc.tmp libcurl/opts/Makefile.inc
awk '{ gsub("CURLINFO_","GNURLINFO_",$0); print $0}' libcurl/opts/Makefile.inc > libcurl/opts/Makefile.inc.tmp
mv libcurl/opts/Makefile.inc.tmp libcurl/opts/Makefile.inc
# docs/libcurl/opts/Makefile.inc
echo "adjusted docs/libcurl/opts/Makefile.inc ..."

cd $S