freedomboneeee/src/freedombone-prepare-scripts

48 lines
1.9 KiB
Plaintext
Raw Permalink Normal View History

2017-06-23 11:35:58 +02:00
#!/bin/bash
2018-04-08 14:30:21 +02:00
# _____ _ _
# | __|___ ___ ___ _| |___ _____| |_ ___ ___ ___
# | __| _| -_| -_| . | . | | . | . | | -_|
# |__| |_| |___|___|___|___|_|_|_|___|___|_|_|___|
2017-06-23 11:35:58 +02:00
#
2018-04-08 14:30:21 +02:00
# Freedom in the Cloud
2017-06-23 11:35:58 +02:00
#
# Prepares control scripts
#
# License
# =======
#
2018-01-25 19:35:39 +01:00
# Copyright (C) 2017-2018 Bob Mottram <bob@freedombone.net>
2017-06-23 11:35:58 +02:00
#
# This program 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.
#
# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
PROJECT_NAME='freedombone'
cat /usr/local/bin/${PROJECT_NAME}-vars /usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-* /usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-* > /tmp/includescripts
2018-05-02 12:22:36 +02:00
cat /tmp/includescripts /usr/local/bin/${PROJECT_NAME}-controlpanel > /usr/local/bin/control
cat /tmp/includescripts /usr/local/bin/${PROJECT_NAME}-controlpanel-user > /usr/local/bin/controluser
cat /tmp/includescripts /usr/local/bin/${PROJECT_NAME}-addremove > /usr/local/bin/addremove
2017-06-23 11:35:58 +02:00
2017-06-23 11:39:44 +02:00
sed -i '/# Start including files/,/# End including files/d' /usr/local/bin/control
sed -i '/# Start including files/,/# End including files/d' /usr/local/bin/controluser
2017-06-23 11:53:25 +02:00
sed -i '/# Start including files/,/# End including files/d' /usr/local/bin/addremove
2017-06-23 11:35:58 +02:00
2017-06-23 11:44:25 +02:00
chmod +x /usr/local/bin/control
chmod +x /usr/local/bin/controluser
2017-06-23 11:53:25 +02:00
chmod +x /usr/local/bin/addremove
2017-06-23 11:44:25 +02:00
2017-06-23 11:35:58 +02:00
rm /tmp/includescripts
exit 0