easy install: some minor fixes
- fix typo in introduction - detect if you're not running strictly as src/00-easy-install.sh
This commit is contained in:
parent
0b81bfd6ec
commit
48e18e1d2d
|
@ -15,7 +15,7 @@
|
||||||
# command!)
|
# command!)
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
die() { echo "$@"; echo "run $0 again without any arguments for help and tips"; exit 1; }
|
die() { echo "$@"; echo; echo "run $0 again without any arguments for help and tips"; exit 1; }
|
||||||
prompt() {
|
prompt() {
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
|
@ -47,7 +47,7 @@ Notes:
|
||||||
|
|
||||||
Pre-requisites:
|
Pre-requisites:
|
||||||
- you must run this from the gitolite working tree top level directory.
|
- you must run this from the gitolite working tree top level directory.
|
||||||
This means you run this as "src/00-easy-install-clientside.sh"
|
This means you run this as "src/00-easy-install.sh"
|
||||||
- you must already have pubkey based access to user@host. If you currently
|
- you must already have pubkey based access to user@host. If you currently
|
||||||
only have password access, use "ssh-copy-id" or something. Somehow get to
|
only have password access, use "ssh-copy-id" or something. Somehow get to
|
||||||
the point where you can type "ssh user@host" and get a command line. Run
|
the point where you can type "ssh user@host" and get a command line. Run
|
||||||
|
@ -62,6 +62,23 @@ EOFU
|
||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# basic sanity / argument checks
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
|
||||||
|
# MANUAL: this *must* be run as "src/00-easy-install.sh", not by cd-ing to src
|
||||||
|
# and then running "./00-easy-install.sh"
|
||||||
|
|
||||||
|
[[ $0 =~ ^src/00-easy-install.sh$ ]] ||
|
||||||
|
{
|
||||||
|
echo "please cd to the gitolite repo top level directory and run this as
|
||||||
|
'src/00-easy-install.sh'"
|
||||||
|
exit 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
# MANUAL: (info) we'll use "git" as the user, "server" as the host, and
|
||||||
|
# "sitaram" as the admin_name in example commands shown below, if any
|
||||||
|
|
||||||
[[ -z $3 ]] && usage
|
[[ -z $3 ]] && usage
|
||||||
user=$1
|
user=$1
|
||||||
host=$2
|
host=$2
|
||||||
|
@ -78,13 +95,6 @@ port=22
|
||||||
[[ "$user" =~ [^a-zA-Z0-9._-] ]] && die "user '$user' invalid"
|
[[ "$user" =~ [^a-zA-Z0-9._-] ]] && die "user '$user' invalid"
|
||||||
[[ "$admin_name" =~ [^a-zA-Z0-9._-] ]] && die "admin_name '$admin_name' invalid"
|
[[ "$admin_name" =~ [^a-zA-Z0-9._-] ]] && die "admin_name '$admin_name' invalid"
|
||||||
|
|
||||||
# MANUAL: (info) we'll use "git" as the user, "server" as the host, and
|
|
||||||
# "sitaram" as the admin_name in example commands shown below, if any
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------
|
|
||||||
# basic sanity checks
|
|
||||||
# ----------------------------------------------------------------------
|
|
||||||
|
|
||||||
# MANUAL: make sure you're in the gitolite directory, at the top level.
|
# MANUAL: make sure you're in the gitolite directory, at the top level.
|
||||||
# The following files should all be visible:
|
# The following files should all be visible:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue