Ver Fonte

Better subdir handling

Zachary Kotlarek há 12 anos atrás
pai
commit
34c57985a7
1 ficheiros alterados com 1 adições e 2 exclusões
  1. 1 2
      sync.sh

+ 1 - 2
sync.sh

@@ -36,8 +36,7 @@ fi
 
 # Allow usage with absolute local paths
 if [ "`echo "${SUB_DIR}" | head -c 1`" == '/' ]; then
-	BASE_LOCAL="`dirname "${SUB_DIR}"`"
-	SUB_DIR="`basename "${SUB_DIR}"`"
+	SUB_DIR="`echo "${SUB_DIR}" | sed "s%${BASE_LOCAL}/%%"`"
 fi
 
 # Sanity checks