Added some action items, expanded apt

Added some TODO lines and expanded the case for 'apt' to be apt* to allow for
apt, apt-get and aptitude (personal preference for the user). Also dropped
quotes from all switch cases.
This commit is contained in:
Josh Sherman 2014-06-28 14:20:08 -04:00
parent f338e86803
commit 23bc6f3022

26
tilde
View file

@ -110,11 +110,11 @@ install_dotfiles()
if [[ $manager_exists == true && $package != '' ]] if [[ $manager_exists == true && $package != '' ]]
then then
case $manager in case $manager in
'aptitude') apt*)
sudo aptitude install $package sudo aptitude install $package
;; ;;
'brew') brew)
if [[ $package == */* ]] if [[ $package == */* ]]
then then
brew tap $package brew tap $package
@ -123,11 +123,11 @@ install_dotfiles()
fi fi
;; ;;
'gem') gem)
sudo gem install $package sudo gem install $package
;; ;;
'npm') npm)
npm install -g $package npm install -g $package
;; ;;
@ -149,6 +149,9 @@ install_dotfiles()
install_file $dotfiles/vim/ ~/.vim install_file $dotfiles/vim/ ~/.vim
install_file $dotfiles/zsh/zshrc ~/.zshrc install_file $dotfiles/zsh/zshrc ~/.zshrc
# TODO .ssh/config
# TODO .subversion/config
# TODO Check for vundle and install it # TODO Check for vundle and install it
# TODO Set up zsh / omz theme # TODO Set up zsh / omz theme
@ -174,6 +177,7 @@ install_dotfiles()
# Creates the undodir if configured in vimrc # Creates the undodir if configured in vimrc
undodir=`grep --no-filename 'undodir' ~/.vim/vimrc -R` undodir=`grep --no-filename 'undodir' ~/.vim/vimrc -R`
# TODO Move this to inside of vimrc
if [[ $undodir != '' ]] if [[ $undodir != '' ]]
then then
undodir=`echo $undodir | awk -F'=' '{print $2}'` undodir=`echo $undodir | awk -F'=' '{print $2}'`
@ -183,8 +187,10 @@ install_dotfiles()
fi fi
} }
# Wondering if we really want be doing all of this, just a straight install is
# most likely all that most people are going to use.
case $1 in case $1 in
'install') install)
clone=$tilde/$2 clone=$tilde/$2
if [ -d $clone ] if [ -d $clone ]
@ -203,11 +209,11 @@ case $1 in
install_dotfiles install_dotfiles
;; ;;
'merge') merge)
# Checks that we're not trying to merge our installed repo # Checks that we're not trying to merge our installed repo
;; ;;
'pull') pull)
echo "Updating $2..." echo "Updating $2..."
cd $clone cd $clone
git pull origin master git pull origin master
@ -216,7 +222,7 @@ case $1 in
install_dotfiles install_dotfiles
;; ;;
'push') push)
echo "Pushing $2..." echo "Pushing $2..."
cd $clone cd $clone
git push origin master git push origin master
@ -224,11 +230,11 @@ case $1 in
;; ;;
*) *)
echo 'Usage: .$ [action] [repo] [options]' echo 'Usage: tilde [action] [repo] [options]'
echo echo
echo 'Examples:' echo 'Examples:'
echo ' install [repo] - clones the repo and runs an installation' echo ' install [repo] - clones the repo and runs an installation'
echo ' merge [repo] [componet] - merges a repo with the installed repo' echo ' merge [repo] [componet[/file]] - merges a repo with the installed repo'
echo ' pull - pulls changes for the installed repo and re-runs installation' echo ' pull - pulls changes for the installed repo and re-runs installation'
echo ' push - pushes changes for the installed repo' echo ' push - pushes changes for the installed repo'
;; ;;