From 21dd38c94d2e80cbb3372448ccc2d8264e6c93b9 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Mon, 22 Dec 2014 16:10:53 +0100 Subject: install: create the installation script usage: ./install.sh user [sudo] ./install.sh global Signed-off-by: Olivier Gayot --- install.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 install.sh (limited to 'install.sh') 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 -- cgit v1.2.3