From 4ef14d855be8f6a56e05483a34f572d5b8c2f151 Mon Sep 17 00:00:00 2001 From: Jakob Stendahl Date: Fri, 17 Jan 2020 12:16:49 +0100 Subject: Updated vimconf, and made som bash scripts --- bin/scps | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 bin/scps (limited to 'bin/scps') diff --git a/bin/scps b/bin/scps new file mode 100755 index 0000000..f8f9b30 --- /dev/null +++ b/bin/scps @@ -0,0 +1,28 @@ +#!/bin/bash + +if [ -z $1 ]; then + tput setaf 1 + echo "Server not provided." + tput sgr0 + exit 1 +fi + +if [ -z $2 ]; then + tput setaf 1 + echo "File not provided." + tput sgr0 + exit 1 +fi + +if [[ -d $2 ]]; then + tput setaf 1 + echo "Cannot move directories..." + tput sgr0 + exit 1 +fi + +SERVER="$1" +FILE="$2" +SERVERFILE="$(basename $FILE)" + +scp "$FILE" "$SERVER":"$SERVERFILE" -- cgit v1.2.3