|
@@ -36,10 +36,10 @@ sub_sync(){
|
|
git submodule update
|
|
git submodule update
|
|
|
|
|
|
if [ ! -z "$1" ]; then
|
|
if [ ! -z "$1" ]; then
|
|
- real_path=$(realpath $1)
|
|
|
|
|
|
+ real_path=$(realpath $HOME/$1)
|
|
to_copy=${real_path#*$HOME}
|
|
to_copy=${real_path#*$HOME}
|
|
cp -R $real_path $dots_dir/$to_copy
|
|
cp -R $real_path $dots_dir/$to_copy
|
|
- mv -rf $real_path
|
|
|
|
|
|
+ rm -rf $real_path
|
|
echo "${to_copy/\//}" >> ../to_sync
|
|
echo "${to_copy/\//}" >> ../to_sync
|
|
fi
|
|
fi
|
|
|
|
|
|
@@ -47,6 +47,7 @@ sub_sync(){
|
|
file="$dots_dir/$p"
|
|
file="$dots_dir/$p"
|
|
git add $file
|
|
git add $file
|
|
done < $script_dir/to_sync
|
|
done < $script_dir/to_sync
|
|
|
|
+ git add start to_sync
|
|
|
|
|
|
if git commit -am "$(date)"; then
|
|
if git commit -am "$(date)"; then
|
|
git remote add origin $repo || true
|
|
git remote add origin $repo || true
|