📄 publish.sh
字号:
#!/bin/sh## This script is used to compile SQLite and all its documentation and# ship everything up to the SQLite website. This script will only work# on the system "zadok" at the Hwaci offices. But others might find# the script useful as an example.## Set srcdir to the name of the directory that contains the publish.sh# script.#srcdir=`echo "$0" | sed 's%\(^.*\)/[^/][^/]*$%\1%'`# Get the makefile.#cp $srcdir/Makefile.linux-gcc ./Makefilechmod +x $srcdir/install-sh# Get the current version number - needed to help build filenames#VERS=`cat $srcdir/VERSION`VERSW=`sed 's/\./_/g' $srcdir/VERSION`echo "VERSIONS: $VERS $VERSW"# Start by building an sqlite shell for linux.#make cleanmake sqlite3.cgcc -Os -Itsrc sqlite3.c tsrc/shell.c -o sqlite3 -ldl -lpthreadstrip sqlite3mv sqlite3 sqlite3-$VERS.bingzip sqlite3-$VERS.binchmod 644 sqlite3-$VERS.bin.gzmv sqlite3-$VERS.bin.gz doc# Build a source archive useful for windows.#make target_sourcecd tsrcrm fts*rm -f ../doc/sqlite-source-$VERSW.zipzip ../doc/sqlite-source-$VERSW.zip *cd ..make sqlite3.ccp tsrc/sqlite3.h .pwdzip doc/sqlite-amalgamation-$VERSW.zip sqlite3.c sqlite3.h# Build the sqlite.so and tclsqlite.so shared libraries# under Linux#make sqlite3.cTCLDIR=/home/drh/tcltk/846/linux/846linuxTCLSTUBLIB=$TCLDIR/libtclstub8.4g.agcc -Os -shared -Itsrc sqlite3.c tsrc/tclsqlite.c $TCLSTUBLIB -o tclsqlite3.sostrip tclsqlite3.sochmod 644 tclsqlite3.somv tclsqlite3.so tclsqlite-$VERS.sogzip tclsqlite-$VERS.somv tclsqlite-$VERS.so.gz docgcc -Os -shared -Itsrc sqlite3.c -o sqlite3.sostrip sqlite3.sochmod 644 sqlite3.somv sqlite3.so sqlite-$VERS.sogzip sqlite-$VERS.somv sqlite-$VERS.so.gz doc# Build the tclsqlite3.dll and sqlite3.dll shared libraries.#. $srcdir/mkdll.shecho zip doc/tclsqlite-$VERSW.zip tclsqlite3.dllzip doc/tclsqlite-$VERSW.zip tclsqlite3.dllecho zip doc/sqlitedll-$VERSW.zip sqlite3.dll sqlite3.defzip doc/sqlitedll-$VERSW.zip sqlite3.dll sqlite3.def# Build the sqlite.exe executable for windows.#make target_sourceOPTS='-DSTATIC_BUILD=1 -DNDEBUG=1'i386-mingw32msvc-gcc -Os $OPTS -Itsrc -I$TCLDIR sqlite3.c tsrc/shell.c \ -o sqlite3.exezip doc/sqlite-$VERSW.zip sqlite3.exe# Construct a tarball of the source tree#ORIGIN=`pwd`cd $srcdircd ..mv sqlite sqlite-$VERSEXCLUDE=`find sqlite-$VERS -print | grep CVS | sed 's,^, --exclude ,'`tar czf $ORIGIN/doc/sqlite-$VERS.tar.gz $EXCLUDE sqlite-$VERSmv sqlite-$VERS sqlitecd $ORIGIN## Build RPMS (binary) and Source RPM## Make sure we are properly setup to build RPMs#echo "%HOME %{expand:%%(cd; pwd)}" > $HOME/.rpmmacrosecho "%_topdir %{HOME}/rpm" >> $HOME/.rpmmacrosmkdir $HOME/rpmmkdir $HOME/rpm/BUILDmkdir $HOME/rpm/SOURCESmkdir $HOME/rpm/RPMSmkdir $HOME/rpm/SRPMSmkdir $HOME/rpm/SPECS# create the spec file from the templatesed s/SQLITE_VERSION/$VERS/g $srcdir/spec.template > $HOME/rpm/SPECS/sqlite.spec# copy the source tarball to the rpm directorycp doc/sqlite-$VERS.tar.gz $HOME/rpm/SOURCES/.# build all the rpmsrpm -ba $HOME/rpm/SPECS/sqlite.spec >& rpm-$vers.log# copy the RPMs into the build directory.mv $HOME/rpm/RPMS/i386/sqlite*-$vers*.rpm docmv $HOME/rpm/SRPMS/sqlite-$vers*.rpm doc# Build the website##cp $srcdir/../historical/* docmake doccd docchmod 644 *.gz
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -