mirror of
https://github.com/lxsang/antd-web-apps
synced 2024-11-20 02:18:20 +01:00
add more service
This commit is contained in:
parent
697501e388
commit
c37f7bf947
8
Makefile
8
Makefile
@ -8,6 +8,14 @@ copy:
|
|||||||
cp -rf $(copyfiles) $(BUILDDIR)
|
cp -rf $(copyfiles) $(BUILDDIR)
|
||||||
cp -r silk $(BUILDDIR)
|
cp -r silk $(BUILDDIR)
|
||||||
|
|
||||||
|
ar:
|
||||||
|
-[ -d /tmp/antd_web_apps ] && rm -r /tmp/antd_web_apps
|
||||||
|
-[ -f /tmp/antd_web_apps.tar.gz ] && rm /tmp/antd_web_apps.tar.gz
|
||||||
|
mkdir /tmp/antd_web_apps
|
||||||
|
BUILDDIR=/tmp/antd_web_apps make
|
||||||
|
cd /tmp/antd_web_apps && tar cvzf ../antd_web_apps.tar.gz .
|
||||||
|
mv /tmp/antd_web_apps.tar.gz dist/
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-for f in $(PROJS); do rm -r $(BUILDDIR)/"$${f}"; done
|
-for f in $(PROJS); do rm -r $(BUILDDIR)/"$${f}"; done
|
||||||
-for f in $(copyfiles); do rm -r $(BUILDDIR)/"$${f}"; done
|
-for f in $(copyfiles); do rm -r $(BUILDDIR)/"$${f}"; done
|
||||||
|
BIN
dist/antd_web_apps.tar.gz
vendored
Normal file
BIN
dist/antd_web_apps.tar.gz
vendored
Normal file
Binary file not shown.
@ -1,57 +1,25 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
echo "AND auto build script"
|
|
||||||
if [ -d "ant-http" ]; then
|
|
||||||
echo "Updating Antd source..."
|
|
||||||
cd "ant-http"
|
|
||||||
git stash
|
|
||||||
git pull
|
|
||||||
else
|
|
||||||
echo "Getting Antd..."
|
|
||||||
git clone https://github.com/lxsang/ant-http
|
|
||||||
cd "ant-http"
|
|
||||||
fi
|
|
||||||
[[ -d "plugins" ]] || mkdir "plugins"
|
|
||||||
echo "getting plugins..."
|
|
||||||
cd "plugins"
|
|
||||||
|
|
||||||
for plugin in $1; do
|
# exit on error
|
||||||
echo "Getting plugin: $plugin..."
|
set -e
|
||||||
if [ -d "antd-$plugin-plugin" ]; then
|
|
||||||
echo "Updating $plugin source..."
|
if [ -z "$1" ]
|
||||||
cd "antd-$plugin-plugin"
|
then
|
||||||
git pull
|
echo "Please specify the version of the server"
|
||||||
cd ../
|
exit 1
|
||||||
else
|
|
||||||
echo "Getting $plugin..."
|
|
||||||
git clone "https://github.com/lxsang/antd-$plugin-plugin"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
cd ../
|
|
||||||
# ask user for some custom setting
|
|
||||||
read -p "Build to (absolute path):" build_dir </dev/tty
|
|
||||||
[[ -d "$build_dir" ]] || mkdir -p "$build_dir"
|
|
||||||
[[ -d "$build_dir/htdocs" ]] || mkdir -p "$build_dir/htdocs"
|
|
||||||
[[ -d "$build_dir/database" ]] || mkdir -p "$build_dir/database"
|
|
||||||
[[ -d "$build_dir/tmp" ]] || mkdir -p "$build_dir/tmp"
|
|
||||||
escape="${build_dir//\//\\/}"
|
|
||||||
escape="${escape//\./\\.}"
|
|
||||||
read -p "Default HTTP port : " http_port </dev/tty
|
|
||||||
cmd="sed -i -E 's/[^P]BUILDIRD=.*/BUILDIRD=$escape/' var.mk"
|
|
||||||
eval $cmd
|
|
||||||
echo
|
|
||||||
make && make antd_plugins
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
echo "[SERVER]" > "$build_dir/config.ini"
|
|
||||||
echo "port=$http_port" >> "$build_dir/config.ini"
|
|
||||||
echo "plugins=$build_dir/plugins/" >> "$build_dir/config.ini"
|
|
||||||
echo "plugins_ext=.dylib" >> "$build_dir/config.ini"
|
|
||||||
echo "database=$build_dir/database/" >> "$build_dir/config.ini"
|
|
||||||
echo "htdocs=$build_dir/htdocs/" >> "$build_dir/config.ini"
|
|
||||||
echo "tmpdir=$build_dir/tmp/" >> "$build_dir/config.ini"
|
|
||||||
echo "ssl.enable=0" >> "$build_dir/config.ini"
|
|
||||||
chmod u+x "$build_dir/antd"
|
|
||||||
echo "Build done, to run the server, execute the command:"
|
|
||||||
echo "$build_dir/antd"
|
|
||||||
else
|
else
|
||||||
echo "FAIL to build, please check dependencies"
|
mkdir -p /tmp/antd
|
||||||
|
rm -rf /tmp/antd/*
|
||||||
|
echo "Downloading antd version $1"
|
||||||
|
cd /tmp/antd
|
||||||
|
wget --no-check-certificate "https://github.com/lxsang/ant-http/raw/master/dist/antd-$1.tar.gz"
|
||||||
|
[[ -f "antd-$1.tar.gz" ]] || { echo "Fail to download the source tarball"; exit 1; }
|
||||||
|
echo "extracting source..."
|
||||||
|
tar xzf "antd-$1.tar.gz"
|
||||||
|
[[ -d "antd-$1" ]] || { echo "Cannot extract the tarball"; exit 1; }
|
||||||
|
cd "antd-$1"
|
||||||
|
CPPFLAGS='-I/usr/local/ssl/include/' LDFLAGS='-L/usr/local/ssl/lib' ./configure --prefix=/usr --enable-debug=yes
|
||||||
|
CPPFLAGS='-I/usr/local/ssl/include/' LDFLAGS='-L/usr/local/ssl/lib' make
|
||||||
|
sudo make install
|
||||||
|
echo "Server installed"
|
||||||
fi
|
fi
|
18
get/shs/antos.sh
Normal file
18
get/shs/antos.sh
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
# base server
|
||||||
|
wget -O- https://get.bitdojo.dev/antd | bash -s "1.0.6b"
|
||||||
|
# base plugin
|
||||||
|
wget -O- https://get.bitdojo.dev/antd_plugin | bash -s "lua-0.5.2b wterm-1.0.0b tunnel-0.1.0b"
|
||||||
|
# install antos
|
||||||
|
|
||||||
|
mkdir -p /opt/www/htdocs
|
||||||
|
|
||||||
|
cd /opt/www/htdocs
|
||||||
|
|
||||||
|
wget --no-check-certificate "https://github.com/lxsang/antos/raw/master/dist/antos-1.0.0.tar.gz"
|
||||||
|
tar xvzf antos-1.0.0.tar.gz
|
||||||
|
|
||||||
|
wget --no-check-certificate "https://github.com/lxsang/antd-web-apps/raw/master/dist/antd_web_apps.tar.gz"
|
||||||
|
tar xvzf antd_web_apps.tar.gz
|
Loading…
Reference in New Issue
Block a user