Skip to content

Commit 61dda66

Browse files
committed
Refactor Code
1 parent 2fea4e2 commit 61dda66

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

backup.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,13 @@ then
178178
echo "$date_now Backing up directories" >> $log_file
179179
for backup_dirs in $backup_directories
180180
do
181-
echo "--> $backup_dirs" | tee -a $log_file
182-
dir_name=`echo $backup_dirs | cut -d / -f2- | sed 's/\//-/g'`
183-
if [[ -d ${backup_dirs}/.git ]]; then
184-
tar -cjf $backup_path/Backup/$path_date/$dir_name.tar.bz2 -X ${backup_dirs}/.gitignore $backup_dirs/ > /dev/null 2> /dev/null
185-
else
186-
tar -cjf $backup_path/Backup/$path_date/$dir_name.tar.bz2 $backup_dirs/ > /dev/null 2> /dev/null
187-
fi
181+
echo "--> $backup_dirs" | tee -a $log_file
182+
dir_name=`echo $backup_dirs | cut -d / -f2- | sed 's/\//-/g'`
183+
if [[ -d ${backup_dirs}/.git ]]; then
184+
tar -cjf $backup_path/Backup/$path_date/$dir_name.tar.bz2 -X ${backup_dirs}/.gitignore $backup_dirs/ > /dev/null 2> /dev/null
185+
else
186+
tar -cjf $backup_path/Backup/$path_date/$dir_name.tar.bz2 $backup_dirs/ > /dev/null 2> /dev/null
187+
fi
188188
done
189189
echo
190190
fi

0 commit comments

Comments
 (0)