mirror of
https://github.com/DictXiong/dxsync.git
synced 2024-11-24 14:31:32 +08:00
Compare commits
No commits in common. "631da6652a81234b3d781cfd29d372bdbd424b6c" and "71cfa14596b87cb12f4d710cf21ec59b65ddb569" have entirely different histories.
631da6652a
...
71cfa14596
9
sync.sh
9
sync.sh
|
@ -30,9 +30,6 @@ locked() {
|
||||||
}
|
}
|
||||||
|
|
||||||
do_sync() {
|
do_sync() {
|
||||||
if [[ -z "$1" ]]; then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
local name="$1"
|
local name="$1"
|
||||||
local safe_name="${name//\//_}"
|
local safe_name="${name//\//_}"
|
||||||
local src="$2"
|
local src="$2"
|
||||||
|
@ -53,14 +50,10 @@ do_sync() {
|
||||||
}
|
}
|
||||||
|
|
||||||
append_index() {
|
append_index() {
|
||||||
if [[ -z "$1" ]]; then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
echo "$1" >> "$STATUS_INDEX"
|
echo "$1" >> "$STATUS_INDEX"
|
||||||
}
|
}
|
||||||
|
|
||||||
rm "$STATUS_INDEX"
|
echo > "$STATUS_INDEX"
|
||||||
touch "$STATUS_INDEX"
|
|
||||||
while read p || [[ -n $p ]]; do
|
while read p || [[ -n $p ]]; do
|
||||||
append_index $p
|
append_index $p
|
||||||
done < "$THIS_DIR"/config
|
done < "$THIS_DIR"/config
|
||||||
|
|
Loading…
Reference in New Issue
Block a user