Added: vimrc is now added to the notes archive, changed to copy instructions instead of move
This commit is contained in:
parent
abf28116fd
commit
874975353f
1 changed files with 5 additions and 3 deletions
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
_help()
|
_help()
|
||||||
{
|
{
|
||||||
echo "Usage: $0 [mode]"
|
echo "dev-env.sh usage: $0 [mode]"
|
||||||
echo "\txn: Extract notes to $TODOTXTPATH and $VIMWIKIPATH."
|
echo "\txn: Extract notes to $TODOTXTPATH and $VIMWIKIPATH."
|
||||||
echo "\tsn: Store notes from $TODOTXTPATH and $VIMWIKIPATH."
|
echo "\tsn: Store notes from $TODOTXTPATH and $VIMWIKIPATH."
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -19,8 +19,9 @@ _extract_notes()
|
||||||
fi
|
fi
|
||||||
mkdir tmp
|
mkdir tmp
|
||||||
tar xzf archive.tar.gz -C .
|
tar xzf archive.tar.gz -C .
|
||||||
mv ./wiki $(dirname $VIMWIKIPATH)
|
cp -r ./tmp/wiki $(dirname $VIMWIKIPATH)
|
||||||
mv ./todo.txt $TODOTXTPATH
|
cp ./tmp/todo.txt $TODOTXTPATH
|
||||||
|
cp ./tmp/.vimrc $MYVIMRC
|
||||||
rm -r ./tmp
|
rm -r ./tmp
|
||||||
echo "Notes successfully extracted from archive."
|
echo "Notes successfully extracted from archive."
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -31,6 +32,7 @@ _storage_notes()
|
||||||
mkdir tmp
|
mkdir tmp
|
||||||
cp $TODOTXTPATH ./tmp/
|
cp $TODOTXTPATH ./tmp/
|
||||||
cp -r $VIMWIKIPATH ./tmp/
|
cp -r $VIMWIKIPATH ./tmp/
|
||||||
|
cp $MYVIMRC ./tmp/
|
||||||
tar czf archive.tar.gz ./tmp/
|
tar czf archive.tar.gz ./tmp/
|
||||||
rm -r tmp
|
rm -r tmp
|
||||||
echo "Notes successfully stored!"
|
echo "Notes successfully stored!"
|
||||||
|
|
Loading…
Reference in a new issue