X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=blobdiff_plain;f=chboot;h=b90b9261187bd5ab6aaff97110a88cb819ad822e;hp=609b41dc758b1f49dd51736d58d570a6ef5a2104;hb=114c4b67d43d7fa1cd7b5014153b82aa8492c74d;hpb=896f57cc86a9babea7bdb2bf39d95ba2c77beca6 diff --git a/chboot b/chboot index 609b41d..b90b926 100755 --- a/chboot +++ b/chboot @@ -1,24 +1,58 @@ #!/bin/bash +# Copyright (C) 2016 Ian Kelling -# Set grub to boot into a different distro, and reboot unless -r -# $0 [DISTRO_NAME] -# with no argument, print available distros +# This program 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# DISTRO_NAME is based on the partition names in /boot. eg boot_debianjessie set -eE -o pipefail trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR [[ $EUID == 0 ]] || exec sudo "$BASH_SOURCE" "$@" +usage() { + cat <