Updated bootstrap.sh

This commit is contained in:
Christian Baer 2020-07-04 22:22:47 +02:00
parent 977e121b1f
commit 199d428366

View File

@ -24,7 +24,8 @@
exclude="README.md|init|Makefile|screenshot.png|.git|.gitignore|.gitmodules|.DS_Store|bootstrap.sh" exclude="README.md|init|Makefile|screenshot.png|.git|.gitignore|.gitmodules|.DS_Store|bootstrap.sh"
bootstrap=`basename -- $0` bootstrap=`basename -- "$0"`
basedir=`dirname "$0"`
# Show help screen # Show help screen
# Usage: help exitcode # Usage: help exitcode
@ -43,6 +44,7 @@ help () {
# Update git repo and submodules # Update git repo and submodules
# Usage: df_update # Usage: df_update
df_update () { df_update () {
echo "#### Updating git repos and submodules"
git pull origin master git pull origin master
git submodule init git submodule init
git submodule update git submodule update
@ -52,6 +54,7 @@ df_update () {
# Deploy files to ~ # Deploy files to ~
# Usage: df_deploy # Usage: df_deploy
df_deploy () { df_deploy () {
echo "#### Copying files to ~"
# poor man's rsync # poor man's rsync
TARGET=`realpath ~` TARGET=`realpath ~`
df_list | cpio -pdmBu --quiet $TARGET df_list | cpio -pdmBu --quiet $TARGET
@ -70,29 +73,26 @@ help)
;; ;;
######################## bootstrap.sh LIST ######################## ######################## bootstrap.sh LIST ########################
list) list)
## Lists all files in repo, except those specified in $exclude" # Lists all files in repo, except those specified in $exclude"
df_list df_list
;; ;;
######################## bootstrap.sh DEPLOY ######################## ######################## bootstrap.sh DEPLOY ########################
deploy) deploy)
echo "#### Copying files to ~"
# Copy vim color scheme and other files to .vim
cp init/nord-dircolors/src/dir_colors .dir_colors # Copy files from init to scripts basedir
cp init/nord-dircolors/src/dir_colors ./.dir_colors
df_deploy df_deploy
;; ;;
######################## bootstrap.sh UPDATE ######################## ######################## bootstrap.sh UPDATE ########################
update) update)
echo "#### Updating git repos and submodules"
df_update df_update
;; ;;
######################## bootstrap.sh INSTALL ######################## ######################## bootstrap.sh INSTALL ########################
install) install)
echo "#### Updating git repos and submodules"
df_update df_update
echo "#### Copying files to ~"
df_deploy df_deploy
;; ;;
*) *)