-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathgenphpfile.sh
More file actions
executable file
·23 lines (20 loc) · 847 Bytes
/
genphpfile.sh
File metadata and controls
executable file
·23 lines (20 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#/bin/bash
echo "// File autogenerated, do not modify directly!" > phpstubstr.h
echo "typedef struct { const char * filename; const char * data; } pcbc_stub_data;" >> phpstubstr.h
echo "pcbc_stub_data PCBC_PHP_CODESTR[] = {" >> phpstubstr.h
add_file () {
echo "{\"[CouchbaseNative]/$1\",\"\\n\" \\" >> phpstubstr.h
tail -n+2 "stub/$1" | sed 's/\\/\\\\/g' | sed 's/\"/\\\"/g' | sed 's/^\(.*\)$/\"\1\\n\" \\/' >> phpstubstr.h
echo "\"\"}," >> phpstubstr.h
}
add_file "constants.php"
add_file "connstr.php"
add_file "default_transcoder.php"
add_file "CouchbaseViewQuery.class.php"
add_file "CouchbaseN1qlQuery.class.php"
add_file "CouchbaseCluster.class.php"
add_file "CouchbaseClusterManager.class.php"
add_file "CouchbaseBucket.class.php"
add_file "CouchbaseBucketManager.class.php"
echo "};" >> phpstubstr.h
echo "Generated phpstubstr.h"