Browse Source

improved regular expression in v-backup-user file

The regular expression now uses exact match of a folder/file name.
With the previous version, some files were ignored during the backup process(for example .gitconfig, because it contains "conf").
olshek 10 years ago
parent
commit
170bd64ec2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      bin/v-backup-user

+ 1 - 1
bin/v-backup-user

@@ -479,7 +479,7 @@ if [ "$USER" != '*' ]; then
     set -f
     set -f
     i=0
     i=0
 
 
-    for udir in $(ls -a |egrep -v "conf|web|dns|mail|^\.\.$|^\.$"); do
+    for udir in $(ls -a |egrep -v "^conf$|^web$|^dns$|^mail$|^\.\.$|^\.$"); do
         exclusion=$(echo "$USER" |tr ',' '\n' |grep "^$udir$")
         exclusion=$(echo "$USER" |tr ',' '\n' |grep "^$udir$")
         if [ -z "$exclusion" ]; then
         if [ -z "$exclusion" ]; then
             ((i ++))
             ((i ++))