#!/bin/bash -e
set +x

# debirf module: coinboot-scripts.

# Copyright (C) 2018 Gunter Miegel coinboot.io
#
# This file is part of Coinboot.
#
# Coinboot is free software: you can redistribute it and/or modify
# it under the terms of the GNU 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.


# Add custom helper scripts of Coinboot to the base image.

debirf_exec apt install inotify-tools curl wget python3-docopt --yes

if [ -d /vagrant ]; then
  cp -v /vagrant/scripts/* "$DEBIRF_ROOT/usr/local/bin/"
else
  cp -v /mnt/scripts/* "$DEBIRF_ROOT/usr/local/bin/"
fi
