Added: vimrc is now added to the notes archive, changed to copy instructions instead of move

This commit is contained in:
Michal Skorczak 2025-01-29 09:42:47 +00:00
parent abf28116fd
commit 874975353f

View file

@ -3,7 +3,7 @@
_help()
{
echo "Usage: $0 [mode]"
echo "dev-env.sh usage: $0 [mode]"
echo "\txn: Extract notes to $TODOTXTPATH and $VIMWIKIPATH."
echo "\tsn: Store notes from $TODOTXTPATH and $VIMWIKIPATH."
exit 1
@ -19,8 +19,9 @@ _extract_notes()
fi
mkdir tmp
tar xzf archive.tar.gz -C .
mv ./wiki $(dirname $VIMWIKIPATH)
mv ./todo.txt $TODOTXTPATH
cp -r ./tmp/wiki $(dirname $VIMWIKIPATH)
cp ./tmp/todo.txt $TODOTXTPATH
cp ./tmp/.vimrc $MYVIMRC
rm -r ./tmp
echo "Notes successfully extracted from archive."
exit 0
@ -31,6 +32,7 @@ _storage_notes()
mkdir tmp
cp $TODOTXTPATH ./tmp/
cp -r $VIMWIKIPATH ./tmp/
cp $MYVIMRC ./tmp/
tar czf archive.tar.gz ./tmp/
rm -r tmp
echo "Notes successfully stored!"