Commit 17c6b386 authored by Hermann Mayer's avatar Hermann Mayer

Docs: Updated the docs. BashRC: Updated the update process. Installer: Added…

Docs: Updated the docs. BashRC: Updated the update process. Installer: Added support to install Ctags support for PHP.
parent 6f4ed307
......@@ -122,17 +122,16 @@ On the full-featured(-IDE) version you may want to install a better
tagbar support for PHP. So just run these commands:
```bash
$ cd /opt/vim-config/dotrc/.vim/tools
$ cd /opt/linux-environment/dotrc/.vim/tools
$ git clone https://github.com/techlivezheng/phpctags.git && cd phpctags
$ curl -s http://getcomposer.org/installer | php
$ php composer.phar install
$ make
```
Another usefull thing to install is the PHP documentation if you need it.
Just run the following:
```bash
$ cd /opt/vim-config/dotrc/.vim/doc
$ cd /opt/linux-environment/dotrc/.vim/doc
$ wget http://www.php.net/get/php_manual_en.tar.gz/from/de1.php.net/mirror -O php_manual_en.tar.gz
$ mkdir php-manual
$ tar xfv php_manual_en.tar.gz -C php-manual --strip-components=1
......
......@@ -73,9 +73,9 @@ function print_usage()
echo
echo " -h, --help Print this Help"
echo " -d, --docs Print a quick use cheatsheet of all helpers"
echo " -d <command>, --docs <command> Print a detailed help of a specific helper"
echo " -d <command>, --docs <command> Print a detailed help of a specific helper"
echo " -l, --logs Show latest changelog of the BashRC project"
echo " -u, --update Update BashRC to the latest available version"
echo " -u, --update Update BashRC to the latest available version"
echo
exit 1
}
......@@ -113,7 +113,7 @@ function print_status()
print_chapter 'News'
local NEWS_URL='http://gitorious.hermann-mayer.net/linux-environment/vim-config/blobs/raw/master/NEWS.md'
local NEWS_URL='http://code.jity.de/Jack12816/linux-environment/raw/master/NEWS.md'
local dlBin="`which curl`"
if [ -z "${dlBin}" ]; then
......@@ -206,55 +206,55 @@ function do_update()
print_doing "Update BashRC"
BASHRC_VERSION=$(cd "$DIR" && git log --pretty="%h" -n1 HEAD)
echo -e "Aktuelle BashRC Version: ${BASHRC_VERSION}"
echo -e "Current BashRC version: ${BASHRC_VERSION}"
print_doing "Lade Updates herunter"
print_doing "Fetch updates"
git fetch --all
print_doing "Wende Updates an"
print_doing "Apply the updates"
git pull
if [ $? -ne 0 ]; then
print_doing_error "Etwas lief schief bei der Anwendung der Updates"
read -e -i 'J' -p "Lokale Änderungen verwerfen? [J/n]: " GIT_RESET
if [ "${GIT_RESET}" = 'J' ]; then
print_doing "Projekt zurücksetzen"
print_doing_error "Something went wrong, while applying the updates"
read -e -i 'J' -p "Do you want to reset your local changes? [Y/n]: " GIT_RESET
if [ "${GIT_RESET}" = 'Y' ]; then
print_doing "Reset the project"
git reset --hard
print_doing "Wende Updates erneut an"
print_doing "Try to apply the updates again"
git pull
if [ $? -ne 0 ]; then
echo -e "\n${bldred}Das Anwendung der Updates scheiterte erneut..${txtrst}"
echo -e "Bitte überprüfen Sie die ausgegeben Fehlermeldungen."
echo -e "\n${bldred}-- Abbruch des Updates --${txtrst}"
echo -e "\n${bldred}Something went wrong, again..${txtrst}"
echo -e "Please check the error messages."
echo -e "\n${bldred}-- Abort of the update --${txtrst}"
return
fi
else
echo -e "\n${bldred}-- Abbruch des Updates --${txtrst}"
echo -e "\n${bldred}-- Abort of the update --${txtrst}"
fi
fi
NEW_BASHRC_VERSION=$(cd "$DIR" && git log --pretty="%h" -n1 HEAD)
print_doing "Finalisiere den Updateprozess"
print_doing "Finalize the update process"
if [ "${BASHRC_VERSION}" = "${NEW_BASHRC_VERSION}" ]; then
echo -e "${bldgrn}Ihre BashRC Version ist bereits die neuste.${txtrst}"
echo -e "${bldgrn}Your BashRC version is up to date.${txtrst}"
return;
else
echo -e "${bldgrn}Updates wurden erfolgreich durchgeführt. Die aktuelle BashRC Version ist nun: ${BASHRC_VERSION}${txtrst}"
echo -e "${bldgrn}We applied successfully the updated. The current BashRC version is now: ${BASHRC_VERSION}${txtrst}"
date +%s > "${BASHRC_LASTUPDATE}"
fi
echo
read -e -i 'J' -p "Vim Update durchführen? [J/n]: " UPDATE_VIM
if [ "${UPDATE_VIM}" = 'J' ]; then
print_doing "Vim Update wird durchgeführt"
vim -c BundleInstall -c sleep -c 'echo "\n\n---\nFehler zu close-duplicate-tabs.vim sind belanglos.\nZum Beenden :qa!"'
read -e -i 'J' -p "Do you want to perform the Vim update? [Y/n]: " UPDATE_VIM
if [ "${UPDATE_VIM}" = 'Y' ]; then
print_doing "Vim update will be done"
vim +PluginInstall +qall
fi
echo
read -e -i 'J' -p "Bash neustarten? [J/n]: " RESTART_BASH
if [ "${RESTART_BASH}" = 'J' ]; then
print_doing "Starte Bash neu"
read -e -i 'J' -p "Do you want to restart your Bash session? [Y/n]: " RESTART_BASH
if [ "${RESTART_BASH}" = 'Y' ]; then
print_doing "Restart Bash"
bash
fi
}
......@@ -295,7 +295,7 @@ while true ; do
break;;
*)
echo "Internal error!"
exit 1;;
print_usage;
break;;
esac
done
......@@ -47,4 +47,4 @@
; [merge]
; tool = meld
; [mergetool "meld"]
; path = vim-config/vendors/bright-meld
; path = ~/.linux-environment/vendors/bright-meld
......@@ -401,7 +401,7 @@ if 1 == VimRCBundlesPHP
let g:pdv_cfg_License = ""
" Advanced PHP CTag generator binary path
let g:tagbar_phpctags_bin='~/.vim/tools/phpctags/phpctags'
let g:tagbar_phpctags_bin='~/.vim/tools/phpctags/build/phpctags.phar'
" Coding References
let g:ref_phpmanual_path = $HOME . '/.vim/doc/php-manual'
......
......@@ -16,7 +16,7 @@ if 1 == VimRCBundlesMisc
" Gvim colorscheme
Plugin 'Wombat'
" Close duplicate tabs
" Plugin 'close-duplicate-tabs'
Plugin 'close-duplicate-tabs'
" Camelcase motion
Plugin 'camelcasemotion'
" Better file browser
......
......@@ -122,6 +122,16 @@ function install_vim_bundles
</dev/tty vim +PluginInstall +qall
}
function install_php_ctags
{
dialog --yesno 'Do you want to install Ctags support for PHP?' 0 0 || \
return 1
cd "$INSTALL_DIR/dotrc/.vim/tools" && \
git clone https://github.com/techlivezheng/phpctags.git && \
cd phpctags && \
make
}
function installation_done
{
dialog --msgbox 'The installation was completed.' 0 0
......@@ -134,4 +144,5 @@ clone_project
install_configs
configure_project
install_vim_bundles
install_php_ctags
installation_done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment