From 16ba2f63083ad8fb7b222d6c577e83e559aec530 Mon Sep 17 00:00:00 2001 From: Calson Noah Date: Fri, 1 Sep 2017 20:18:16 +0100 Subject: [PATCH] optimized install script --- installation/INSTALL | 55 +++++++++++++++++++++++++++++++++++++++++ installation/install.sh | 22 +++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 installation/INSTALL create mode 100755 installation/install.sh diff --git a/installation/INSTALL b/installation/INSTALL new file mode 100644 index 0000000..e4d15ee --- /dev/null +++ b/installation/INSTALL @@ -0,0 +1,55 @@ +Download +-------- + +You can get cmdtypist by cloning the repo from github, create an empty directory +called cmdtypist and cd into it. Download cmdtypist into it by running + + git clone https://github.com/Noslac/cmd_typist + +Installation +------------ +Open a terminal and navigate to the directory containing cmdtypist and all +it's files. Run + + ./install.sh + +to install cmdtypist + +RUNNING: +------- + +If install.sh exited with a success message, then you have installed cmdtypist, +you can then run the command + + cmdtypist argument1 argument2 argument3 + +from any directory. argument1, argument2,... are valid cmdtypist arguments, +to know all valid arguments, run the cmdtypist help command or consult the help +file which comes with the program. + +The above instructions have been tested on ubuntu 14.04 LTS and ubuntu 16.04 LTS + +If running cmdtypist produces a "Fatal error: some files are missing" error, +then you probably did not place all cmdtypist files in the same directory. + +UNINSTALL +--------- + +If you are having problems with cmdtypist configurations, you can run the +command + + cmdtypist reset raw + +to reset settings to default. But if you want to permanently uninstall cmdtypist, +proceed below. + +To uninstall cmdtypist, open a terminal and cd into directory containing the +unintall script by running + + cd $HOME/cmdtypist/uninstall/ + +finally, run + + ./uninstall + +to completely remove cmdtypist and associated files. diff --git a/installation/install.sh b/installation/install.sh new file mode 100755 index 0000000..546eb11 --- /dev/null +++ b/installation/install.sh @@ -0,0 +1,22 @@ +#!/bin/bash +#install cmdtypist +sudo cp ../cmdtypist /usr/bin/cmdtypist && +mkdir $HOME/cmdtypist && +cp -r ../ $HOME/cmdtypist/ && +sudo cp ../cmdtypist /usr/bin/ && +sudo chmod +x /usr/bin/cmdtypist && +(echo "CMDTYPIST successfully compiled and installed, learn how to use cmdtypist commands by running 'cmdtypist --help'"; exit 0) || +(c=$?; echo "CMDTYPIST was unable to install: "; (exit $c)) + + +# if [echo "Enter root password: "]; then +# if [sudo gcc ./cmdtypist.c -o ./cmdtypist]; then +# if [[ sudo mkdir /opt/cmdtypist ]]; then +# if [[ sudo cp -r . /opt/cmtypist/ ]]; then +# echo "Cmdtypist successfully compiled and installed, learn how to use cmdtypist commands by running 'cmdtypist --help'" +# else +# echo "cmdtypist was unable to install, make sure the directory /opt exist and try again" +# fi +# fi +# fi +# fi \ No newline at end of file