Mercurial > index.cgi > dotfiles
comparison .bash_aliases @ 238:bf173fdcf76e
Updating 'hgs' to work without localhost (better for proxying)
author | Steve Huston <huston@astro.princeton.edu> |
---|---|
date | Mon, 30 Jan 2023 14:27:38 -0500 |
parents | 2b3e169f8182 |
children | 3d194431481b |
comparison
equal
deleted
inserted
replaced
237:adb977adb9d7 | 238:bf173fdcf76e |
---|---|
243 else | 243 else |
244 if [ -e $ROOT/.hg/hgserve-PID ] ; then | 244 if [ -e $ROOT/.hg/hgserve-PID ] ; then |
245 P=`cat $ROOT/.hg/hgserve-PID` | 245 P=`cat $ROOT/.hg/hgserve-PID` |
246 URL=`lsof -n -p $P | grep LISTEN | awk '{print $9}'` | 246 URL=`lsof -n -p $P | grep LISTEN | awk '{print $9}'` |
247 else | 247 else |
248 URL=`hg serve -a localhost -d -p 0 --pid-file $ROOT/.hg/hgserve-PID | sed 's#.*bound to \(.*\))#\1#'` | 248 URL=`hg serve -d -p 0 --pid-file $ROOT/.hg/hgserve-PID | sed 's#.*at http://\(.*\)/ (bound.*#\1#'` |
249 fi | 249 fi |
250 if [ -z "$DARWIN" ] ; then | 250 if [ -z "$DARWIN" ] ; then |
251 echo hg serve on http://$URL/ | 251 echo hg serve on http://$URL/ |
252 else | 252 else |
253 open http://$URL/ | 253 open http://$URL/ |