From d6969f4eb4aba04e9b3569c45e6c689320861e86 Mon Sep 17 00:00:00 2001
From: Teddy Wing
Date: Fri, 23 Nov 2018 01:04:17 +0100
Subject: Move the `bin/` directory into the project root
Makes more sense to run `./bin/setup` from the root.
---
bin/init | 21 +++++++++++++++++
bin/setup | 57 +++++++++++++++++++++++++++++++++++++++++++++
license-generator/bin/init | 21 -----------------
license-generator/bin/setup | 57 ---------------------------------------------
4 files changed, 78 insertions(+), 78 deletions(-)
create mode 100755 bin/init
create mode 100755 bin/setup
delete mode 100755 license-generator/bin/init
delete mode 100755 license-generator/bin/setup
diff --git a/bin/init b/bin/init
new file mode 100755
index 0000000..55a33e9
--- /dev/null
+++ b/bin/init
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# Copyright (c) 2018 Teddy Wing
+#
+# This file is part of DomeKey Web.
+#
+# DomeKey Web is free software: you can redistribute it and/or modify it
+# under the terms of the GNU Affero General Public License as published
+# by the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# DomeKey Web 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
+# Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public
+# License along with DomeKey Web. If not, see
+# .
+
+source .env
diff --git a/bin/setup b/bin/setup
new file mode 100755
index 0000000..a2d27a4
--- /dev/null
+++ b/bin/setup
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+# Copyright (c) 2018 Teddy Wing
+#
+# This file is part of DomeKey Web.
+#
+# DomeKey Web is free software: you can redistribute it and/or modify it
+# under the terms of the GNU Affero General Public License as published
+# by the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# DomeKey Web 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
+# Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public
+# License along with DomeKey Web. If not, see
+# .
+
+function program_exists () {
+ local program="$1"
+
+ command -v "$program" > /dev/null
+}
+
+function install_if_not_found () {
+ local program="$1"
+
+ if ! program_exists "$1"; then
+ brew install "$program"
+ fi
+}
+
+if [ "$1" = "--install" ]; then
+ if ! program_exists hasp; then
+ mkdir /usr/local/Cellar/hasp
+ git clone https://github.com/djanowski/hasp.git /usr/local/Cellar/hasp/HEAD
+ brew link hasp
+ fi
+
+ install_if_not_found golang-migrate
+
+ if ! program_exists mysql; then
+ brew install mariadb
+ fi
+fi
+
+
+if [ ! -f .env ]; then
+ cp .env.sample .env
+fi
+
+
+vim .env
+source .env
+migrate-up
diff --git a/license-generator/bin/init b/license-generator/bin/init
deleted file mode 100755
index 55a33e9..0000000
--- a/license-generator/bin/init
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# Copyright (c) 2018 Teddy Wing
-#
-# This file is part of DomeKey Web.
-#
-# DomeKey Web is free software: you can redistribute it and/or modify it
-# under the terms of the GNU Affero General Public License as published
-# by the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# DomeKey Web 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
-# Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public
-# License along with DomeKey Web. If not, see
-# .
-
-source .env
diff --git a/license-generator/bin/setup b/license-generator/bin/setup
deleted file mode 100755
index a2d27a4..0000000
--- a/license-generator/bin/setup
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/sh
-
-# Copyright (c) 2018 Teddy Wing
-#
-# This file is part of DomeKey Web.
-#
-# DomeKey Web is free software: you can redistribute it and/or modify it
-# under the terms of the GNU Affero General Public License as published
-# by the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# DomeKey Web 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
-# Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public
-# License along with DomeKey Web. If not, see
-# .
-
-function program_exists () {
- local program="$1"
-
- command -v "$program" > /dev/null
-}
-
-function install_if_not_found () {
- local program="$1"
-
- if ! program_exists "$1"; then
- brew install "$program"
- fi
-}
-
-if [ "$1" = "--install" ]; then
- if ! program_exists hasp; then
- mkdir /usr/local/Cellar/hasp
- git clone https://github.com/djanowski/hasp.git /usr/local/Cellar/hasp/HEAD
- brew link hasp
- fi
-
- install_if_not_found golang-migrate
-
- if ! program_exists mysql; then
- brew install mariadb
- fi
-fi
-
-
-if [ ! -f .env ]; then
- cp .env.sample .env
-fi
-
-
-vim .env
-source .env
-migrate-up
--
cgit v1.2.3