Last active
September 26, 2017 16:18
-
-
Save tyru/dffdbdb52f267cdcbd1c to your computer and use it in GitHub Desktop.
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 | |
set -ue | |
#set -x | |
cd $(dirname $0) | |
. environ.sh | |
cd "$VIMREPODIR" | |
[ "$CFLAGS" ] && export CFLAGS | |
[ "$CXXFLAGS" ] && export CXXFLAGS | |
# Build | |
echo 'Building...' | |
[ -f ./configure ] || make --quiet configure | |
fail=false | |
sh -c "./configure --quiet $CONFIG_OPTS" || fail=true | |
if $fail; then # Retry | |
make --quiet distclean | |
sh -c "./configure --quiet $CONFIG_OPTS" | |
fi | |
make --quiet | |
echo 'Building... Done!' | |
exit 0 |
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 | |
set -ue | |
#set -x | |
VIMREPODIR=$HOME/git/vim | |
PREFIX=$HOME/vim.head | |
# NOTE: Don't use -march=native for distcc environment. | |
CFLAGS="-march=native" | |
CXXFLAGS="${CFLAGS}" | |
CONFIG_OPTS="--prefix=$PREFIX" | |
CONFIG_OPTS="$CONFIG_OPTS --with-features=huge" | |
CONFIG_OPTS="$CONFIG_OPTS --enable-multibyte" | |
CONFIG_OPTS="$CONFIG_OPTS --with-compiledby='tyru <[email protected]>'" | |
#CONFIG_OPTS="$CONFIG_OPTS --enable-perlinterp" | |
#CONFIG_OPTS="$CONFIG_OPTS --enable-pythoninterp" | |
#CONFIG_OPTS="$CONFIG_OPTS --enable-rubyinterp" | |
CONFIG_OPTS="$CONFIG_OPTS --enable-luainterp" | |
#CONFIG_OPTS="$CONFIG_OPTS --with-lua-prefix=/usr/local" | |
CONFIG_OPTS="$CONFIG_OPTS --with-luajit" | |
CONFIG_OPTS="$CONFIG_OPTS --enable-gui=gtk2" | |
CONFIG_OPTS="$CONFIG_OPTS --enable-fontset" | |
CONFIG_OPTS="$CONFIG_OPTS --enable-fail-if-missing" | |
CONFIG_OPTS="$CONFIG_OPTS --enable-gpm" | |
CONFIG_OPTS="$CONFIG_OPTS --enable-xim" | |
CONFIG_OPTS="$CONFIG_OPTS --enable-fontset" |
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 | |
set -ue | |
#set -x | |
cd $(dirname $0) | |
. environ.sh | |
cd "$VIMREPODIR" | |
echo 'Installing...' | |
fail=false | |
rm -rf "$PREFIX" || fail=true | |
if $fail; then | |
echo | |
echo "!!!!! Failed to remove '$PREFIX' !!!!!" >&2 | |
exit 2 | |
fi | |
[ ! -d "$PREFIX" ] && make install >/dev/null 2>&1 | |
echo 'Installing... Done!' | |
# Warn | |
vim_in_the_path() { | |
echo "$PATH" | tr ':' '\n' | fgrep -q "$PREFIX/bin" | |
} | |
if ! vim_in_the_path; then | |
cat <<EOM >&2 | |
+=================================================+ | |
| '$PREFIX/bin' is not in your \$PATH ! | | |
| Please set your own .bash_profile, and so on. | | |
+=================================================+ | |
EOM | |
fi | |
exit 0 |
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 | |
set -ue | |
#set -x | |
UPDATE=false | |
BUILD=false | |
INSTALL=false | |
ask() { | |
echo -n "$@" | |
read answer || return 0 | |
echo "$answer" | egrep -q -i '^y' | |
} | |
if ask 'update? [y/n]: '; then | |
UPDATE=true | |
echo 'update: Yes' | |
else | |
echo 'update: No' | |
fi | |
if ask 'build? [y/n]: '; then | |
BUILD=true | |
echo 'build: Yes' | |
else | |
echo 'build: No' | |
fi | |
if ask 'install? [y/n]: '; then | |
INSTALL=true | |
echo 'install: Yes' | |
else | |
echo 'install: No' | |
fi | |
dir=$(dirname $0) | |
# Update | |
$UPDATE && $dir/update.sh | |
# Build | |
$BUILD && $dir/build.sh | |
# Install | |
$INSTALL && $dir/install.sh | |
exit 0 |
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 | |
set -ue | |
#set -x | |
cd $(dirname $0) | |
. environ.sh | |
cd "$VIMREPODIR" | |
echo 'Updating...' | |
status=$(git status --porcelain) | |
if [ "$status" != "" ]; then | |
echo | |
echo "!!!!! Working is dirty or has untracked files !!!!!" >&2 | |
echo "$status" >&2 | |
exit 1 | |
fi | |
git pull --quiet --rebase | |
echo 'Updating... Done!' | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
参考リンク