Skip to content

Instantly share code, notes, and snippets.

@amosbird
Last active December 1, 2018 07:58
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save amosbird/6c82d4d3d78d204d1c832e5c32dc2a1e to your computer and use it in GitHub Desktop.
Save amosbird/6c82d4d3d78d204d1c832e5c32dc2a1e to your computer and use it in GitHub Desktop.
restore configurations.
#!/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
@AsceticDog
Copy link

AsceticDog commented Feb 9, 2017

great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment