Last active
December 1, 2018 07:58
-
-
Save amosbird/6c82d4d3d78d204d1c832e5c32dc2a1e to your computer and use it in GitHub Desktop.
restore configurations.
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
#!/usr/bin/env bash | |
export PATH=$HOME/bin:$PATH | |
# Centos 6 | |
# install binutil https://ftp.gnu.org/gnu/binutils/ | |
./configure --prefix=$HOME | |
make -j`nproc` | |
make install | |
# install gcc https://gcc.gnu.org/mirrors.html | |
# may need proxychains | |
./contrib/download_prerequisites | |
mkdir build | |
cd build | |
../configure \ | |
--prefix=$HOME \ | |
--disable-multilib \ | |
--with-system-zlib \ | |
--enable-languages=c,c++ | |
make -j`nproc` | |
# install python27 https://www.python.org/downloads/ | |
./configure --prefix=/home/amos --enable-shared --enable-optimizations | |
make -j`nproc` | |
make install | |
curl https://bootstrap.pypa.io/get-pip.py | python - --user | |
# install autoconf https://ftp.gnu.org/gnu/autoconf/ | |
./configure --prefix=$HOME | |
make -j`nproc` install | |
# install automake https://ftp.gnu.org/gnu/automake/ | |
./configure --prefix=$HOME | |
make -j`nproc` install | |
# install m4 https://ftp.gnu.org/gnu/m4/ | |
./configure --prefix=$HOME | |
make -j`nproc` install | |
# install pkg-config https://pkg-config.freedesktop.org/releases/ | |
sudo yum install glib2 | |
./configure --prefix=$HOME | |
make -j`nproc` install | |
# install jump | |
go get -u github.com/gsamokovarov/jump | |
# install fzf | |
# wait this to be fixed https://github.com/junegunn/fzf/pull/838 | |
git clone --depth 1 https://github.com/amosbird/fzf.git ~/.fzf | |
~/.fzf/install --bin | |
# install bfs | |
git clone https://github.com/tavianator/bfs | |
cd bfs | |
make LDFLAGS="-lrt" # centos 6 | |
make | |
make PREFIX=$HOME install | |
# install ncurses https://ftp.gnu.org/pub/gnu/ncurses | |
./configure --prefix=$HOME --libdir=$HOME/lib64 | |
make -j install | |
# install tmux | |
git clone https://github.com/tmux/tmux | |
sudo yum install libevent2-devel | |
cd tmux | |
sh autogen.sh | |
# may need to fix configure : change ncurse to -lncurse | |
./configure --prefix=$HOME | |
make -j install | |
# wget https://github.com/emacs-mirror/emacs/archive/master.zip -O emacs.zip | |
unzip emacs.zip | |
cd emacs-master | |
./autogen.sh all | |
./configure --prefix=$HOME --without-x --without-tls | |
make -j`nproc` bootstrap | |
make install | |
# consider using nightly build https://github.com/fish-shell/fish-shell/wiki/Nightly-builds when pr merged | |
# centos 6 needs newer autoconf and automake | |
wget https://github.com/amosbird/fish-shell/archive/master.zip -O fishshell.zip | |
unzip fishshell.zip | |
cd fish-shell-master | |
autoreconf --no-recursive | |
./configure --prefix=$HOME | |
make -j`nproc` | |
# install global https://www.gnu.org/software/global/download.html | |
./configure --prefix=$HOME | |
make -j install | |
# install rust | |
curl https://sh.rustup.rs -sSf | sh | |
# install cmake https://cmake.org/download/ | |
./configure --prefix=$HOME | |
make -j install | |
# install ninja | |
# install llvm | |
git clone https://github.com/amosbird/build-llvm | |
cd build-llvm | |
./build.sh | |
# install ycmd | |
git clone https://github.com/Valloric/ycmd | |
git submodule update --init --recursive | |
./build.py --system-libclang --clang-completer --gocode-completer --racer-completer --tern-completer | |
# install Bear | |
git clone https://github.com/rizsotto/Bear | |
cd Bear | |
cmake -DCMAKE_INSTALL_PREFIX=$HOME . && make -j install | |
# install pygments pip install pygments | |
# install dtrx pip install https://brettcsmith.org/2007/dtrx/dtrx-7.1.tar.gz#egg=dtrx | |
# install shellcheck https://github.com/koalaman/shellcheck/wiki/CentOS6 | |
bk=$(mktemp -d XXXXX) | |
mv ~/.emacs.d $bk/.emacs.bak | |
mv ~/.tmux.conf $bk/.tmux.conf.bak | |
mv ~/.tmux $bk/.tmux.bak | |
mv ~/.config/fish $bk/.fish.bak | |
echo "backup configurations in $bk" | |
wd=$(mktemp -d XXXXX) | |
pushd $wd | |
wget https://github.com/amosbird/fishconfig/archive/master.zip -O fish.zip | |
unzip fish.zip | |
mkdir -p ~/.config | |
cp -r fishconfig-master ~/.config/fish | |
cp $bk/.fish.bak/fishd.* ~/.config/fish/ | |
wget https://github.com/amosbird/tmuxconfig/archive/master.zip -O tmux.zip | |
unzip tmux.zip | |
cp -r tmuxconfig-master ~/.tmux | |
ln -s ~/.tmux/.tmux.conf ~/ | |
wget https://github.com/amosbird/spacemacsconfig/archive/master.zip -O spacemacs.zip | |
unzip spacemacs.zip | |
mv spacemacsconfig-master spacemacs | |
git clone https://github.com/syl20bnr/spacemacs -b develop ~/.emacs.d | |
rsync -a --exclude='.spacemacs' spacemacs/ ~/.emacs.d/private/ | |
cp spacemacs/.spacemacs ~/ | |
popd | |
rm -rf $wd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
great