From 25eb97b31173ffdfa15aeb3a74d21b66ca6d4d57 Mon Sep 17 00:00:00 2001 From: Jack-Benny Persson Date: Thu, 9 Jan 2014 06:46:38 +0100 Subject: [PATCH] Added LICENSE, extended README and Makefile --- LICENSE | 17 +++++++++++++++++ Makefile | 14 ++++++++++---- README.md | 21 ++++++++++++++++++--- 3 files changed, 45 insertions(+), 7 deletions(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..c6535a6 --- /dev/null +++ b/LICENSE @@ -0,0 +1,17 @@ +Copyright (C) 2014 Jack-Benny Persson + +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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + diff --git a/Makefile b/Makefile index b702acb..6b6774c 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,18 @@ FILES=shellchooser.sh bashfiles/profile bashfiles/bashrc cshfiles/cshrc \ ashfiles/profile +SHELLS=/bin/ash /bin/bash /bin/csh /bin/kalle shellchooser: $(FILES) - $(info Use 'make install' to install shellchooser on your system) - $(info Use 'make uninstall' to uninstall shellchooser from your system) - $(info Please see README for more information on shellchooser) + $(info Use 'make install' to install shellchooser on your system.) + $(info Use 'make uninstall' to uninstall shellchooser from your system.) + $(info Please see README for more information on shellchooser.) + $(info Your system should have bash, ash and csh installed.) + $(info Of these shells your system have the following shells installed:) + @which ash + @which bash + @which csh -install: $(FILES) +install: $(FILES) $(SHELLS) chmod 755 shellchooser.sh cp shellchooser.sh /bin/shellchooser.sh mkdir /etc/shellchooser diff --git a/README.md b/README.md index 82d295d..d546882 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,21 @@ might need to be changed on different systems. ## Usage ## Bundled with shellchooser is a small Makefile to ease installation of the script. Simply run `make install` to install shellchooser.sh into /bin and the -profile/bashrc/cshrc files into /etc/shellchooser. The installation also put -/bin/shellchooser.sh into /etc/shells so that system utilities won't complain -about it not being a valid shell. +profile/bashrc/cshrc files into /etc/shellchooser/. The installation will also +put /bin/shellchooser.sh into /etc/shells so that system utilities won't +complain about it not being a valid shell. Note that `make install` will fail +if you don't have all the required shells install on your system. The make +command will tell you which shells you are missing so that you can install them +on your system. See below how to install shells on some various systems. +To uninstall all of the files from the system including removing +shellchooser.sh from /etc/shells simply run `make uninstall` from this +directory. +Simply running `make` will print some short usage of the Makefile and which +shells your system have installed (and which shells you should have installed). + +## Install Bash, Ash and Csh ## +### Debian/Ubuntu ### +`sudo apt-get install ` + +### OpenSuSE ### +`zypper install `