insert data only if folder missing

This commit is contained in:
q
2018-08-14 16:47:55 +03:00
parent 43c072fd6a
commit c7ef1fac7c

View File

@@ -35,8 +35,9 @@ _help() {
_load_config() {
STORAGE=${CCLIP_HOME:-~/.cache/cclip}
[[ -d "$STORAGE" ]] || {
_msg "Creating $STORAGE folder, and inserting sample data"
mkdir -p "$STORAGE"
[[ -e "$STORAGE"/0 ]] || {
echo Sample data | _write_stdin 0
}
}