This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=begin | |
Single-file K/V database and query script. | |
This one also does compression (because disk I/O and efficiency and | |
"best practices" and shut up, that's why). | |
Inspired by (and hopefully more ridiculous than) https://gist.github.com/4280027 | |
=end | |
USAGE = <<END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GIT="`which git`" | |
HG="`which hg`" | |
function checkvcs() { | |
base=$1 | |
if [[ -d "${base}/.git" ]]; then | |
VCS="$GIT" | |
elif [[ -d "${base}/.hg" ]]; then | |
VCS="$HG" | |
else |