@sebastienrousseau/dotfiles 0.2.458 β 0.2.459
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +62 -11
- package/dist/Makefile +31 -53
- package/dist/bin/constants.d.ts +2 -2
- package/dist/bin/constants.d.ts.map +1 -1
- package/dist/bin/constants.js +1 -1
- package/dist/bin/constants.js.map +1 -1
- package/dist/bin/dotfiles.js +1 -1
- package/dist/bin/dotfiles.js.map +1 -1
- package/dist/filesizes.txt +74 -26
- package/dist/lib/aliases/default/default.aliases.sh +2 -8
- package/dist/lib/aliases/gcloud/gcloud.aliases.sh +1 -1
- package/dist/lib/aliases/git/git.aliases.sh +5 -5
- package/dist/lib/aliases/heroku/heroku.aliases.sh +1 -1
- package/dist/lib/aliases/jekyll/jekyll.aliases.sh +1 -1
- package/dist/lib/aliases/pnpm/pnpm.aliases.sh +1 -1
- package/dist/lib/aliases/subversion/subversion.aliases.sh +1 -1
- package/dist/lib/aliases/tmux/tmux.aliases.sh +1 -1
- package/dist/lib/aliases.sh +1 -1
- package/dist/lib/configurations/bash/bashrc +24 -24
- package/dist/lib/configurations/curl/curlrc +1 -1
- package/dist/lib/configurations/default/color.sh +1 -1
- package/dist/lib/configurations/default/constants.sh +39 -0
- package/dist/lib/configurations/default/editor.sh +1 -1
- package/dist/lib/configurations/default/prompt.sh +1 -1
- package/dist/lib/configurations/gem/gemrc +9 -0
- package/dist/lib/configurations/{inputrc β input}/inputrc +1 -1
- package/dist/lib/configurations/nano/nanorc +34 -0
- package/dist/lib/configurations/profile/profile +1 -1
- package/dist/lib/configurations/tmux/default +1 -1
- package/dist/lib/configurations/tmux/display +1 -1
- package/dist/lib/configurations/tmux/linux +1 -1
- package/dist/lib/configurations/tmux/navigation +1 -1
- package/dist/lib/configurations/tmux/panes +1 -1
- package/dist/lib/configurations/tmux/theme +4 -4
- package/dist/lib/configurations/tmux/tmux +1 -1
- package/dist/lib/configurations/tmux/vi +1 -1
- package/dist/lib/configurations/vim/vimrc +1 -1
- package/dist/lib/configurations/wget/wgetrc +1 -1
- package/dist/lib/configurations/zsh/zshrc +15 -16
- package/dist/lib/configurations.sh +1 -1
- package/dist/lib/exit.sh +1 -1
- package/dist/lib/functions/cdls.sh +1 -1
- package/dist/lib/functions/changediskpwd.tmp +19 -0
- package/dist/lib/functions/code.tmp +18 -0
- package/dist/lib/functions/countdown.tmp +33 -0
- package/dist/lib/functions/curlheader.sh +1 -1
- package/dist/lib/functions/curltime.sh +1 -1
- package/dist/lib/functions/encode64.sh +1 -1
- package/dist/lib/functions/environment.sh +1 -1
- package/dist/lib/functions/extract.sh +1 -1
- package/dist/lib/functions/genpwd.sh +1 -1
- package/dist/lib/functions/goto.sh +1 -1
- package/dist/lib/functions/headers.tmp +4 -0
- package/dist/lib/functions/hidehiddenfiles.sh +1 -1
- package/dist/lib/functions/history-all.tmp +7 -0
- package/dist/lib/functions/hostinfo.sh +1 -1
- package/dist/lib/functions/hstats.sh +1 -1
- package/dist/lib/functions/httpdebug.sh +1 -1
- package/dist/lib/functions/keygen.sh +1 -1
- package/dist/lib/functions/last.sh +1 -1
- package/dist/lib/functions/logout.sh +1 -1
- package/dist/lib/functions/lowercase.sh +1 -1
- package/dist/lib/functions/macos.sh +1 -1
- package/dist/lib/functions/matrix.sh +7 -2
- package/dist/lib/functions/mcd.sh +1 -1
- package/dist/lib/functions/mount_read_only.sh +1 -1
- package/dist/lib/functions/myproc.sh +1 -1
- package/dist/lib/functions/prependpath.sh +1 -1
- package/dist/lib/functions/print.tmp +13 -0
- package/dist/lib/functions/ql.sh +1 -1
- package/dist/lib/functions/rd.sh +1 -1
- package/dist/lib/functions/remove_disk.sh +1 -1
- package/dist/lib/functions/ren.sh +1 -1
- package/dist/lib/functions/rm.tmp +13 -0
- package/dist/lib/functions/rps.tmp +103 -0
- package/dist/lib/functions/showhiddenfiles.sh +1 -1
- package/dist/lib/functions/size.sh +1 -1
- package/dist/lib/functions/stopwatch.sh +1 -1
- package/dist/lib/functions/trash.tmp +13 -0
- package/dist/lib/functions/tree.tmp +13 -0
- package/dist/lib/functions/uppercase.sh +1 -1
- package/dist/lib/functions/uuidgen.tmp +27 -0
- package/dist/lib/functions/view-source.sh +1 -1
- package/dist/lib/functions/vscode.sh +1 -1
- package/dist/lib/functions/whoisport.sh +1 -1
- package/dist/lib/functions/zipf.sh +1 -1
- package/dist/lib/functions.sh +1 -1
- package/dist/lib/history.sh +1 -1
- package/dist/lib/paths/ant/ant.paths.sh +1 -1
- package/dist/lib/paths/default/default.paths.sh +1 -1
- package/dist/lib/paths/homebrew/homebrew.paths.sh +1 -1
- package/dist/lib/paths/java/java.paths.sh +1 -1
- package/dist/lib/paths/maven/maven.paths.sh +1 -1
- package/dist/lib/paths/node/node.paths.sh +1 -1
- package/dist/lib/paths/nvm/nvm.paths.sh +1 -1
- package/dist/lib/paths/pnpm/pnpm.paths.sh +1 -1
- package/dist/lib/paths/python/python.paths.sh +1 -1
- package/dist/lib/paths/ruby/ruby.paths.sh +1 -1
- package/dist/lib/paths/tmux/tmux.paths.sh +1 -1
- package/dist/lib/paths.sh +1 -1
- package/dist/scripts/assemble.sh +32 -0
- package/dist/scripts/backup.sh +84 -0
- package/dist/scripts/banner.sh +18 -0
- package/dist/scripts/clean.sh +29 -0
- package/dist/scripts/compile.sh +52 -0
- package/dist/scripts/copy.sh +106 -0
- package/dist/scripts/dotfiles.sh +61 -0
- package/dist/scripts/download.sh +23 -0
- package/dist/scripts/help.sh +55 -0
- package/dist/scripts/unpack.sh +26 -0
- package/package.json +14 -37
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# π
³π
Ύππ
΅π
Έπ
»π
΄π (v0.2.459) - https://dotfiles.io
|
|
3
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
4
|
+
# License: MIT
|
|
5
|
+
|
|
6
|
+
# history-all: Function to display the full view of the history command
|
|
7
|
+
#function history-all { history -E 1 }
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# π
³π
Ύππ
΅π
Έπ
»π
΄π (v0.2.
|
|
2
|
+
# π
³π
Ύππ
΅π
Έπ
»π
΄π (v0.2.459) - https://dotfiles.io
|
|
3
3
|
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
4
4
|
# License: MIT
|
|
5
5
|
|
|
6
6
|
# matrix: Function to Enable Matrix Effect in the terminal
|
|
7
7
|
matrix() {
|
|
8
|
-
echo
|
|
8
|
+
echo "\\e[1;40m"
|
|
9
|
+
clear
|
|
10
|
+
while :; do
|
|
11
|
+
echo $LINES $COLUMNS $((RANDOM % COLUMNS)) $((RANDOM % 72))
|
|
12
|
+
sleep 0.05
|
|
13
|
+
done | awk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}'
|
|
9
14
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# π
³π
Ύππ
΅π
Έπ
»π
΄π (v0.2.459) - https://dotfiles.io
|
|
3
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
4
|
+
# License: MIT
|
|
5
|
+
|
|
6
|
+
# print: Function to display the argument given
|
|
7
|
+
# print() {
|
|
8
|
+
# if [[ "$#" != 1 ]]; then
|
|
9
|
+
# echo "[ERROR] Please add one argument" >&2
|
|
10
|
+
# return 1
|
|
11
|
+
# fi
|
|
12
|
+
# echo "$1"
|
|
13
|
+
# }
|
package/dist/lib/functions/ql.sh
CHANGED
package/dist/lib/functions/rd.sh
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# π
³π
Ύππ
΅π
Έπ
»π
΄π (v0.2.459) - https://dotfiles.io
|
|
3
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
4
|
+
# License: MIT
|
|
5
|
+
|
|
6
|
+
# rm: Function to make 'rm' move files to the trash
|
|
7
|
+
# function rm() {
|
|
8
|
+
# if [[ "$#" != 1 ]]; then
|
|
9
|
+
# echo "[ERROR] Please add one argument" >&2
|
|
10
|
+
# return 1
|
|
11
|
+
# fi
|
|
12
|
+
# rm "$1"
|
|
13
|
+
# }
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# π
³π
Ύππ
΅π
Έπ
»π
΄π (v0.2.459) - https://dotfiles.io
|
|
3
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
4
|
+
# License: MIT
|
|
5
|
+
|
|
6
|
+
# Adapted from https://github.com/Ananta-Gupta/Rock-Paper-Scissors
|
|
7
|
+
|
|
8
|
+
# rps: Function to play Rock Paper Scissors
|
|
9
|
+
|
|
10
|
+
# check() {
|
|
11
|
+
# if [ "$1" == "$2" ]; then
|
|
12
|
+
# echo "Draw!"
|
|
13
|
+
# elif [ "$1" = 1 ] && [ "$2" = 2 ]; then
|
|
14
|
+
# echo "You Lose! Paper beats Rock!"
|
|
15
|
+
# elif [ "$1" = 2 ] && [ "$2" = 3 ]; then
|
|
16
|
+
# echo "You Lose! Scissor beats Paper!"
|
|
17
|
+
# elif [ "$1" = 3 ] && [ "$2" = 1 ]; then
|
|
18
|
+
# echo "You Lose! Rock beats Scissor!"
|
|
19
|
+
# elif [ "$1" != 1 ] && [ "$1" != 2 ] && [ "$1" != 3 ]; then
|
|
20
|
+
# echo "Invalid input! You have not entered a valid number"
|
|
21
|
+
# else
|
|
22
|
+
# echo " β You Win! ππ»"
|
|
23
|
+
# fi
|
|
24
|
+
# }
|
|
25
|
+
|
|
26
|
+
# print() {
|
|
27
|
+
# echo ""
|
|
28
|
+
# echo "ββββββββββββββββββββββββββββββββββββββββ"
|
|
29
|
+
# echo "β β"
|
|
30
|
+
# echo "β Rock, Paper, Scissors β"
|
|
31
|
+
# echo "β β"
|
|
32
|
+
# echo "ββββββββββββββββββββββββββββββββββββββββ"
|
|
33
|
+
# echo ""
|
|
34
|
+
# echo "Enter a choice :"
|
|
35
|
+
# echo "1 for Rock"
|
|
36
|
+
# echo "2 for Paper"
|
|
37
|
+
# echo "3 for Scissor"
|
|
38
|
+
# echo ""
|
|
39
|
+
# }
|
|
40
|
+
|
|
41
|
+
# rps() {
|
|
42
|
+
|
|
43
|
+
# clr=0
|
|
44
|
+
# i=0
|
|
45
|
+
# while [ $i != 1 ]; do
|
|
46
|
+
# if [ $clr = 0 ]; then
|
|
47
|
+
# clr=0
|
|
48
|
+
# clear
|
|
49
|
+
# print 1
|
|
50
|
+
# fi
|
|
51
|
+
# read -r ch1
|
|
52
|
+
# echo ""
|
|
53
|
+
|
|
54
|
+
# case $ch1 in
|
|
55
|
+
# 1)
|
|
56
|
+
# echo "You chose rock"
|
|
57
|
+
# ;;
|
|
58
|
+
# 2)
|
|
59
|
+
# echo "You chose paper"
|
|
60
|
+
# ;;
|
|
61
|
+
# 3)
|
|
62
|
+
# echo "You chose scissor"
|
|
63
|
+
# ;;
|
|
64
|
+
# esac
|
|
65
|
+
|
|
66
|
+
# if [ "$ch1" = 0 ] && [ "$ch1" = 3 ]; then
|
|
67
|
+
# echo "please choose from 1, 2 or 3."
|
|
68
|
+
# clr=1
|
|
69
|
+
# continue
|
|
70
|
+
# fi
|
|
71
|
+
|
|
72
|
+
# ch2=$(echo "$RANDOM%3+1" | bc)
|
|
73
|
+
|
|
74
|
+
# case $ch2 in
|
|
75
|
+
# 1)
|
|
76
|
+
# echo "The computer chose rock"
|
|
77
|
+
# ;;
|
|
78
|
+
# 2)
|
|
79
|
+
# echo "The computer chose paper"
|
|
80
|
+
# ;;
|
|
81
|
+
# 3)
|
|
82
|
+
# echo "The computer chose scissor"
|
|
83
|
+
# ;;
|
|
84
|
+
# esac
|
|
85
|
+
|
|
86
|
+
# check "${ch1}" "${ch2}"
|
|
87
|
+
# echo "To exit press 0"
|
|
88
|
+
# echo "To play again press p : "
|
|
89
|
+
# read -r ch3
|
|
90
|
+
# if [ "$ch3" = p ]; then
|
|
91
|
+
# rep=6
|
|
92
|
+
# while [ $rep != 0 ]; do
|
|
93
|
+
# clear
|
|
94
|
+
# print 1
|
|
95
|
+
# echo "Starting in $($rep - 1) seconds!!!"
|
|
96
|
+
# rep=$($rep - 1)
|
|
97
|
+
# done
|
|
98
|
+
# continue
|
|
99
|
+
# else
|
|
100
|
+
# exit
|
|
101
|
+
# fi
|
|
102
|
+
# done
|
|
103
|
+
# }
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# π
³π
Ύππ
΅π
Έπ
»π
΄π (v0.2.459) - https://dotfiles.io
|
|
3
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
4
|
+
# License: MIT
|
|
5
|
+
|
|
6
|
+
# trash: Function to moves a file to the MacOS trash
|
|
7
|
+
#trash(){
|
|
8
|
+
# if [ "$#" != 1 ]; then
|
|
9
|
+
# echo "[ERROR] Please add one argument" >&2
|
|
10
|
+
# return 1
|
|
11
|
+
# fi
|
|
12
|
+
# rm "$1"
|
|
13
|
+
#}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# π
³π
Ύππ
΅π
Έπ
»π
΄π (v0.2.459) - https://dotfiles.io
|
|
3
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
4
|
+
# License: MIT
|
|
5
|
+
|
|
6
|
+
# tree: Function to generates a tree view from the current directory
|
|
7
|
+
#if [ ! -e /usr/local/bin/tree ]; then
|
|
8
|
+
# tree(){
|
|
9
|
+
# pwd
|
|
10
|
+
# ls -R | grep ":$" | \
|
|
11
|
+
# sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'
|
|
12
|
+
# }
|
|
13
|
+
#fi
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# π
³π
Ύππ
΅π
Έπ
»π
΄π (v0.2.452) - https://dotfiles.io
|
|
3
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
4
|
+
# License: MIT
|
|
5
|
+
|
|
6
|
+
# uuid: Function to generate a UUID (Universally Unique IDentifier)
|
|
7
|
+
# uuidgen() {
|
|
8
|
+
# local N B C='89ab' # 89ab is the hexadecimal value of 10, 11, 12, 13, 14, 15 in decimal
|
|
9
|
+
# for ((N = 0; N < 16; ++N)); do
|
|
10
|
+
# B=$(("$RANDOM" % 256))
|
|
11
|
+
# case $N in
|
|
12
|
+
# 6)
|
|
13
|
+
# printf '4%x' $((B % 16))
|
|
14
|
+
# ;;
|
|
15
|
+
# 8)
|
|
16
|
+
# printf '%c%x' ${C:$RANDOM%${#C}:1} ${B % 16}
|
|
17
|
+
# ;;
|
|
18
|
+
# 3 | 5 | 7 | 9)
|
|
19
|
+
# printf '%02x-' "${B}"
|
|
20
|
+
# ;;
|
|
21
|
+
# *)
|
|
22
|
+
# printf '%02x' "${B}"
|
|
23
|
+
# ;;
|
|
24
|
+
# esac
|
|
25
|
+
# done
|
|
26
|
+
# echo
|
|
27
|
+
# }
|
package/dist/lib/functions.sh
CHANGED
package/dist/lib/history.sh
CHANGED
package/dist/lib/paths.sh
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# π
³π
Ύππ
΅π
Έπ
»π
΄π (v0.2.459) - https://dotfiles.io
|
|
3
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
4
|
+
# License: MIT
|
|
5
|
+
|
|
6
|
+
# shellcheck disable=SC1091
|
|
7
|
+
. "./lib/configurations/default/constants.sh"
|
|
8
|
+
|
|
9
|
+
# shellcheck disable=SC1091
|
|
10
|
+
. "./scripts/backup.sh"
|
|
11
|
+
|
|
12
|
+
# shellcheck disable=SC1091
|
|
13
|
+
. "./scripts/download.sh"
|
|
14
|
+
|
|
15
|
+
# shellcheck disable=SC1091
|
|
16
|
+
. "./scripts/unpack.sh"
|
|
17
|
+
|
|
18
|
+
# shellcheck disable=SC1091
|
|
19
|
+
. "./scripts/copy.sh"
|
|
20
|
+
|
|
21
|
+
## π
°πππ
΄π
Όπ
±π
»π
΄ - Assemble the dotfiles on your system.
|
|
22
|
+
assemble() {
|
|
23
|
+
|
|
24
|
+
# shellcheck disable=SC2154
|
|
25
|
+
echo "${RED}β${NC} Preparing the dotfiles on your system."
|
|
26
|
+
|
|
27
|
+
backup &&
|
|
28
|
+
download &&
|
|
29
|
+
unpack &&
|
|
30
|
+
copy
|
|
31
|
+
|
|
32
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# π
³π
Ύππ
΅π
Έπ
»π
΄π (v0.2.459) - https://dotfiles.io
|
|
3
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
4
|
+
# License: MIT
|
|
5
|
+
|
|
6
|
+
## π
π
°ππ
Έπ
°π
±π
»π
΄π - Set Dotfiles variable.
|
|
7
|
+
DF_DOTFILESDIR="${HOME}/.dotfiles" # Location of dotfiles.
|
|
8
|
+
export DF_DOTFILESDIR # Exporting Location of dotfiles.
|
|
9
|
+
|
|
10
|
+
## π
±π
°π
²π
Ίππ
Ώ - Backup existing files.
|
|
11
|
+
backup() {
|
|
12
|
+
|
|
13
|
+
# shellcheck disable=SC1091
|
|
14
|
+
. "./lib/configurations/default/constants.sh"
|
|
15
|
+
|
|
16
|
+
echo ""
|
|
17
|
+
# shellcheck disable=SC2154
|
|
18
|
+
echo "${RED}β${NC} Starting Backup Procedure."
|
|
19
|
+
echo ""
|
|
20
|
+
|
|
21
|
+
# Create backup directory.
|
|
22
|
+
# shellcheck disable=SC2154
|
|
23
|
+
if [[ -d "${DF_BACKUPDIR}" ]]; then
|
|
24
|
+
echo "${RED} β${NC} Skipping folder creation."
|
|
25
|
+
else
|
|
26
|
+
# shellcheck disable=SC2154
|
|
27
|
+
echo "${GREEN} β${NC} Creating backup directory '${GREEN}${DF_BACKUPDIR}${NC}'..."
|
|
28
|
+
mkdir -p "${DF_BACKUPDIR}"
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
# Backup existing Dotfiles directory.
|
|
32
|
+
if [[ -d "${HOME}"/.dotfiles ]]; then
|
|
33
|
+
echo "${GREEN} β${NC} Backing up previous Dotfiles installation to '${GREEN}${DF_BACKUPDIR}/${DF_TIMESTAMP}/${NC}'..."
|
|
34
|
+
# shellcheck disable=SC2154
|
|
35
|
+
mv -f "${DF_DOTFILESDIR}" "${HOME}"/dotfiles_backup/"${DF_TIMESTAMP}"/
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
# File list (use trailing slash for directories)
|
|
39
|
+
FILES="
|
|
40
|
+
.alias
|
|
41
|
+
.bash_aliases
|
|
42
|
+
.bash_profile
|
|
43
|
+
.bash_prompt
|
|
44
|
+
.bashrc
|
|
45
|
+
.curlrc
|
|
46
|
+
.dir_colors
|
|
47
|
+
.exports
|
|
48
|
+
.functions
|
|
49
|
+
.gitattributes
|
|
50
|
+
.gitconfig
|
|
51
|
+
.gitignore
|
|
52
|
+
.gitmessage
|
|
53
|
+
.inputrc
|
|
54
|
+
.npmrc
|
|
55
|
+
.path
|
|
56
|
+
.profile
|
|
57
|
+
.tmux.conf
|
|
58
|
+
.vimrc
|
|
59
|
+
.wgetrc
|
|
60
|
+
.yarnrc
|
|
61
|
+
.zshenv
|
|
62
|
+
.zshrc
|
|
63
|
+
cacert.pem
|
|
64
|
+
"
|
|
65
|
+
|
|
66
|
+
for file in ${FILES}; do
|
|
67
|
+
# shellcheck disable=SC2292
|
|
68
|
+
if [ -e "${HOME}/${file}" ]; then
|
|
69
|
+
echo "${GREEN} β${NC} Backing up '${YELLOW}${file}${NC}'"
|
|
70
|
+
cp -f "${HOME}"/"${file}" "${DF_BACKUPDIR}"/"${file}"
|
|
71
|
+
fi
|
|
72
|
+
done
|
|
73
|
+
|
|
74
|
+
# shellcheck disable=SC2154
|
|
75
|
+
echo "${GREEN} β${NC} All files have been backed up to '${CYAN}${DF_BACKUPDIR}${NC}'"
|
|
76
|
+
echo ""
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
args=$* # Arguments passed to script.
|
|
80
|
+
export args="${args}" # Exporting arguments.
|
|
81
|
+
if [[ ${args} = "backup" ]]; then
|
|
82
|
+
echo "$*"
|
|
83
|
+
backup
|
|
84
|
+
fi
|