Created
August 6, 2017 08:16
-
-
Save dahu/a5fce430f8045d1f87da9fc74ab46f70 to your computer and use it in GitHub Desktop.
Script to set a fossil repository's project-name and description fields
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
#!/bin/sh | |
# Attribution: unknown. Probably taken from the fossil-users mailing list. | |
usage() { echo usage: $0 'archive.fossil "project name" "project description"' ; exit 1 ; } | |
dbname="$1" | |
pname="$2" | |
pdesc="$3" | |
test -z "$4" || usage | |
test -f "${dbname}" || usage | |
test -n "${pname}" || usage | |
test -n "${pdesc}" || usage | |
fossil sqlite -R "${dbname}" "insert or replace into config values (\"project-name\", \"${pname}\", now());" | |
fossil sqlite -R "${dbname}" "insert or replace into config values (\"project-description\", \"${pdesc}\", now());" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment