Add comments for update
This commit is contained in:
parent
3e87fce434
commit
b85d6303bb
3 changed files with 8 additions and 7 deletions
|
@ -42,7 +42,7 @@ dotinstall:
|
|||
|
||||
### functions
|
||||
|
||||
#### bin_check
|
||||
#### required_commands
|
||||
|
||||
This function check if binary file is avaible in the `PATH`.
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
# └── mail.timer
|
||||
|
||||
# check required executables
|
||||
check_bin "neomutt notmuch mbsync afew msmtp"
|
||||
required_commands "neomutt notmuch mbsync afew msmtp"
|
||||
|
||||
# symblink folder which contains configurations folders to $HOME/.config/
|
||||
process_dirs config ${HOME}/.config
|
||||
|
|
|
@ -181,9 +181,10 @@ process_dirs () {
|
|||
# $2: destination directory
|
||||
|
||||
local dest="${repository}/$1"
|
||||
printf "\nProcess directory %s\n" "$1"
|
||||
local source="$2"
|
||||
printf "\nProcess directory %s\n" "$source"
|
||||
|
||||
[ ! -d "$dest" ] && { error " -> source is not a directory $dest"; return; }
|
||||
[ ! -d "$source" ] && { error " -> source is not a directory"; return; }
|
||||
[ ! -d "$dest" ] && { error " -> destination is not a directory"; return; }
|
||||
|
||||
while read d
|
||||
|
@ -263,7 +264,7 @@ install_service ()
|
|||
|
||||
}
|
||||
|
||||
check_bin ()
|
||||
required_commands ()
|
||||
{
|
||||
# Check if an executable exist
|
||||
# $1 executables separated with spaces
|
||||
|
@ -367,7 +368,6 @@ fi
|
|||
[ ! -f "$bootstrap_file" ] && die "$bootstrap_file does not exist" 2 1
|
||||
|
||||
private:get_bootstrap_path "$bootstrap_file"
|
||||
|
||||
cache_file="${CACHE_DIR}/$(echo $repository | tr '/' '_')"
|
||||
|
||||
if [ $update -eq 1 ]
|
||||
|
@ -380,7 +380,8 @@ then
|
|||
printf "There is no difference between cached copy and the bootstrap file\n";
|
||||
exit 0
|
||||
else
|
||||
# Uninstall old files
|
||||
# for updating the dotfile repo, we need to uninstall it then
|
||||
# install it. We need the cached copy for unistall.
|
||||
install=0
|
||||
source "$cache_file"
|
||||
rm "$cache_file"
|
||||
|
|
Reference in a new issue