Add these three commands:
-
lpg on <loc> make, equivalent to lpg make <loc>
-
lpg ensure <loc>, equivalent to [ -e <loc> ] || lpg make <loc>
-
lpg on <loc> ensure, equivalent to lpg ensure <loc>
These are useful when using alias my-lpg="lpg on '$MY_LPG_LOC' ", so that you can just my-lpg ensure before an lpg operation to make sure it succeeds.
Maybe better is to add an -e flag to every on op, which creates the DB if it does not exist? Then you can alias my-lpg="lpg on '$MY_LPG_LOC' -e ".
Add these three commands:
lpg on <loc> make, equivalent tolpg make <loc>lpg ensure <loc>, equivalent to[ -e <loc> ] || lpg make <loc>lpg on <loc> ensure, equivalent tolpg ensure <loc>These are useful when using
alias my-lpg="lpg on '$MY_LPG_LOC' ", so that you can justmy-lpg ensurebefore anlpgoperation to make sure it succeeds.Maybe better is to add an
-eflag to everyonop, which creates the DB if it does not exist? Then you canalias my-lpg="lpg on '$MY_LPG_LOC' -e ".