summaryrefslogtreecommitdiff
path: root/install.sh
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2014-12-22 16:10:53 +0100
committerOlivier Gayot <duskcoder@gmail.com>2014-12-22 16:36:20 +0100
commit21dd38c94d2e80cbb3372448ccc2d8264e6c93b9 (patch)
treefd73d7064079209e9e9778f6ea13d6b6be86ee9f /install.sh
parent566f3a44516fd0c6f2012b2847e22890ccc1c064 (diff)
install: create the installation script
usage: ./install.sh user [sudo] ./install.sh global Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
Diffstat (limited to 'install.sh')
-rw-r--r--install.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/install.sh b/install.sh
new file mode 100644
index 0000000..3c3c49b
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+if [ $# -lt 1 ]; then
+ echo "usage: $0 user | global"
+ exit 1
+fi
+
+shopt -s dotglob 2> /dev/null
+
+case "$1" in
+ user)
+ echo "installing the user configuration..."
+ find user -maxdepth 1 -mindepth 1 -exec cp -ivr {} ~ \;
+ ;;
+ global)
+ echo "installing the global configuration..."
+ find global -maxdepth 1 -mindepth 1 -exec cp -ivr {} / \;
+ ;;
+ *)
+ echo "invalid command"
+ ;;
+esac