1
0
mirror of https://github.com/aquatix/dotfiles.git synced 2025-12-06 21:45:10 +01:00

Check for ~/.dot_is_server for green prompt; install script facilitates

this and now asks whether hg extensions are wanted
This commit is contained in:
Michiel Scholten
2014-07-15 20:47:31 +02:00
parent 7d23bfc3b6
commit e81adf238d
2 changed files with 39 additions and 18 deletions

View File

@@ -76,7 +76,7 @@ if [ "$color_prompt" = yes ]; then
YELLOW="\[\033[0;33m\]" YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]" GREEN="\[\033[0;32m\]"
PROMPT_SYMBOL='$' PROMPT_SYMBOL='$'
if [ "${HOSTNAME}" = "higgs.aquariusoft.org" ] || [ "${HOSTNAME}" = "medusa" ]; then if [ -e ~/.dot_is_server ]; then
PS1="$YELLOW\t $GREEN\u$BLACK@\h:\W$ " PS1="$YELLOW\t $GREEN\u$BLACK@\h:\W$ "
else else
PS1="$YELLOW\t $BLUE\u$BLACK@\h:\W$ " PS1="$YELLOW\t $BLUE\u$BLACK@\h:\W$ "

View File

@@ -1,6 +1,30 @@
#!/bin/sh #!/bin/sh
# inspired by rrix' dotfiles # inspired by rrix' dotfiles
install_hg()
{
break
# Mercurial extensions
touch ~/.dot_has_hg
HGDIR=~/workspace/application_addons/mercurial
mkdir -p $HGDIR
cd $HGDIR
for REPO in Mekk/mercurial_keyring sjl/hg-prompt durin42/hg-git yujiewu/hgflow
do
REPODIR="${REPO##*/}"
echo $REPODIR
if [ ! -d "$HGDIR/$REPODIR" ]; then
hg clone http://bitbucket.org/$REPO
#echo http://bitbucket.org/$REPO
else
cd $HGDIR/$REPODIR
#echo $HGDIR/$REPODIR
hg pull -u
fi
done
}
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR cd $DIR
@@ -22,21 +46,18 @@ fi
echo "INFO: Vundle Install" echo "INFO: Vundle Install"
vim +BundleInstall +qall vim +BundleInstall +qall
# Mercurial extensions echo "Do you wish to install mercurial stuff?"
HGDIR=~/workspace/application_addons/mercurial select yn in "Yes" "No"; do
mkdir -p $HGDIR case $yn in
cd $HGDIR Yes ) install_hg; break;;
No ) break;;
for REPO in Mekk/mercurial_keyring sjl/hg-prompt durin42/hg-git yujiewu/hgflow esac
do done
REPODIR="${REPO##*/}"
echo $REPODIR echo "Is this machine a server?"
if [ ! -d "$HGDIR/$REPODIR" ]; then select yn in "Yes" "No"; do
hg clone http://bitbucket.org/$REPO case $yn in
#echo http://bitbucket.org/$REPO Yes ) touch ~/.dot_is_server; break;;
else No ) break;;
cd $HGDIR/$REPODIR esac
#echo $HGDIR/$REPODIR
hg pull -u
fi
done done