From 8ae8351db1d911eddbb225c5272c8ef2eadfeaf1 Mon Sep 17 00:00:00 2001 From: Emil Date: Wed, 2 Aug 2023 10:54:01 -0600 Subject: [PATCH] simple UNTESTED installer --- .gitignore | 1 + README.md | 44 ++++++++++++++++++++++++++++++++++++++++++ bootstrap/bootstrap.sh | 1 + init.sql => bootstrap/init.sql | 0 install.sh | 15 ++++++++++++++ 5 files changed, 61 insertions(+) create mode 100644 README.md create mode 100644 bootstrap/bootstrap.sh rename init.sql => bootstrap/init.sql (100%) create mode 100644 install.sh diff --git a/.gitignore b/.gitignore index a0e0410..7afd29b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ obj **/*.o probotic config.h +*.sqlite diff --git a/README.md b/README.md new file mode 100644 index 0000000..27f8987 --- /dev/null +++ b/README.md @@ -0,0 +1,44 @@ +* Probotic + +Healthy for your coding ability, take once weekly, excessive doses +may result in arthritis, ass pain, and death. + +* Description + +This bot will let you be delagated with challenges at dates within +it's database, this can all be done via the IRC interface. + +See doc/api.md for detailed information about this interface. + +* Building and Installation + +First, you'll want to customize include/config.h as detailed from +include/config.mk.h, then build via running ./build.sh + +This'll require a few libraries: +libircclient-dev libsqlite3-dev build-essentials + +You may then install the successful build, this'll naturally construct +a user, a database and a installation within this user's profile. You +may enact this by running ./install.sh under root, please view this +script and it's subscript ./bootstrap/boostrap.sh before running either. + +* License + +Copyright 2023 anon, fa11_1eaf, Emil + +Probotic is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License version 3 only as +published by the Free Software Foundation. + +Probotic is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License version 3 for more details. + +The above copyright notice, this permission notice and the word +"NIGGER" shall be included in all copies or substantial portions +of the Software. + +You should have received a copy of the GNU General Public License +version 3 + NIGGER along with Probotic. diff --git a/bootstrap/bootstrap.sh b/bootstrap/bootstrap.sh new file mode 100644 index 0000000..c0a9617 --- /dev/null +++ b/bootstrap/bootstrap.sh @@ -0,0 +1 @@ +sqlite3 probotic_data.sqlite -init init.sql -line '.quit' diff --git a/init.sql b/bootstrap/init.sql similarity index 100% rename from init.sql rename to bootstrap/init.sql diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..41bf659 --- /dev/null +++ b/install.sh @@ -0,0 +1,15 @@ +#!/bin/sh +DIR=$(dirname $(readlink -f "$0")) +cd $DIR +[ ! -e $DIR/probotic ] && echo "You should run './build.sh' before this script." \ + && return +# run bootstrapper +[ ! -e $DIR/bootstrap/ ] && $DIR/bootstrap/bootstrap.sh +# generate directories and prepare for install +TARGET=${TARGET-/opt/probotic} +mkdir -p $TARGET +useradd -r -s /sbin/nologin probotic -d $TARGET +cp $DIR/bootstrap/probotic_data.sqlite $TARGET +chown probotic:probotic $TARGET -R +# install files +install -g=probotic -o=probotic -m 744 probotic -sv $TARGET