瀏覽代碼

Better subdir handling

Zachary Kotlarek 12 年之前
父節點
當前提交
34c57985a7
共有 1 個文件被更改,包括 1 次插入 和 2 次删除
  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