💾 Archived View for hajime.4teri.de › dotfiles › file › deploy.sh.gmi captured on 2021-12-05 at 23:47:19. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-12-03)

-=-=-=-=-=-=-

deploy.sh - dotfiles - Collection of my dotfiles

Log

Files

Refs

---

deploy.sh (697B)

---

1 #! /bin/sh

2

3 GREEN="\033[32;48m"

4 RED="\033[31;38m"

5 END="\033[0m"

6

7 deploy()

8 {

9 if [ -z "$2" ]

10 then

11 echo "$GREEN Moving $1 to $HOME/.$1 $END"

12 cp "$1" "$HOME/.$1"

13 else

14 echo "$GREEN Moving $1 to $2 $END"

15 cp "$1" "$2"

16 fi

17 }

18

19 deploy_dir()

20 {

21 if ! [ -e "$2" ]

22 then

23 echo "$RED $2 does not exist. $END"

24 else

25 echo "$GREEN Moving contents of $1 to $2 $END"

26 for file in "$1"

27 do

28 deploy "$file" "$2"

29 done

30 fi

31 }

32

33 echo "Using $HOME as \$HOME"

34

35 deploy zshrc

36 deploy vimrc

37 deploy wallpapermap

38 deploy gitconfig

39 deploy tmux.conf

40

41 deploy_dir scripts $HOME/.config/scripts

42 deploy_dir env $HOME/.config/env

43 deploy_dir configures $HOME/.config/configures

44 deploy_dir newsboat $HOME/.config/newsboat

generated w/ stagit-gemini