Last active
September 14, 2015 17:35
-
-
Save NQNStudios/0bf63d489336c9b5fd52 to your computer and use it in GitHub Desktop.
Uses Git/Bash commands to install my personal Vim configuration from the vimfiles repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# optional first argument is the directory to place the configuration files | |
VIMDIR=${1:-".vim"} | |
# clone vimfiles repository in home directory | |
cd ~/ | |
git clone git@github.com:Natman64/vimfiles.git | |
mv vimfiles ${VIMDIR} | |
# register and clone vimfiles submodules | |
cd ${VIMDIR} | |
git submodule init | |
git submodule update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
#optional first parameter: desired vimfiles directory | |
VIMDIR=${1:-".vim"} | |
cd ~/$VIMDIR | |
git add bundle/* | |
git add colors/* | |
git add ftplugin/* | |
git add plugin/* | |
git commit -a | |
git pull | |
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
VIM_DIR=${1:-".vim"} | |
OIFS=$IFS | |
IFS=' ' | |
DEVICE_INFO=$(lsusb | grep "HTC") | |
STEP_VAR=0 | |
DEVICE_BUS="" | |
DEVICE_NUMBER="" | |
for x in $DEVICE_INFO | |
do | |
if [ $STEP_VAR == 1 ]; then | |
DEVICE_BUS=$x | |
fi | |
if [ $STEP_VAR == 3 ]; then | |
DEVICE_NUMBER=$x | |
fi | |
let "STEP_VAR++" | |
done | |
LEN=$((${#DEVICE_NUMBER} - 1)) | |
DEVICE_ID=${DEVICE_NUMBER:0:$LEN} | |
PHONE_DIR="/run/user/$UID/gvfs/gphoto2:host=%5Busb%3A${DEVICE_BUS}%2C${DEVICE_ID}%5D" | |
if [ ! -d $PHONE_DIR ]; then | |
echo "Remember to plug in your Android and mount it in File Manager" | |
exit -1 | |
fi | |
cd $PHONE_DIR | |
rm -r $VIM_DIR | |
cd ~/ | |
cp -r ~/${VIM_DIR} $PHONE_DIR | |
cd $PHONE_DIR | |
mv ${VIM_DIR}/vimrc-mobile .vimrc | |
IFS=$OIFS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# optional first parameter: desired vimfiles directory | |
VIMDIR=${1:-".vim"} | |
cd ~/$VIMDIR | |
git pull origin master | |
git submodule init | |
git submodule update | |
git submodule foreach git pull origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment