From da69610ea544224b08e818bdcf7b70678c3e8235 Mon Sep 17 00:00:00 2001 From: Valentin Gehrke Date: Fri, 23 Oct 2015 19:39:01 +0200 Subject: [PATCH] No need for dotfiles script anymore --- scripts/.config/scripts/dotfiles.sh | 62 ----------------------------- 1 file changed, 62 deletions(-) delete mode 100755 scripts/.config/scripts/dotfiles.sh diff --git a/scripts/.config/scripts/dotfiles.sh b/scripts/.config/scripts/dotfiles.sh deleted file mode 100755 index dbdea5e..0000000 --- a/scripts/.config/scripts/dotfiles.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash - -DOTFILES_DIR="$HOME/Projects/config" - -command_diff() { - cd $DOTFILES_DIR - git diff $@ -} - -command_commit() { - cd $DOTFILES_DIR - git add . - git commit -m $1 -} - -command_status() { - cd $DOTFILES_DIR - git status -} - -command_add() { - file=$1 - savepoint=$2 - mkdir -p "$DOTFILES_DIR/$(dirname "$savepoint")" - mv "$file" "$DOTFILES_DIR/$savepoint" - ln -s "$DOTFILES_DIR/$savepoint" "$file" - cd $DOTFILES_DIR - git add "$savepoint" - git commit -m "Added $savepoint" - - echo "$file added in $DOTFILES_DIR/$savepoint" -} - -command_pull() { - cd $DOTFILES_DIR - git pull -} - -command_push() { - cd $DOTFILES_DIR - git push -} - -command_help() { - echo "diff -- Show diffs" - echo "commit [message] -- Add all files and commit" - echo "status -- Show status" - echo "add [file] [savepoint] -- Add file to dotfiles at savepoint, create symlink and add" - echo "push -- git push" - echo "pull -- git pull" -} - -CMD=$1 -shift -case "$CMD" in - diff|commit|add|status|sync|help|push|pull) - command_$CMD $@ - ;; - *) - command_help - ;; -esac