1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-05-20 02:43:23 -07:00

clean up compiler and loop stuff

This commit is contained in:
Connor Olding 2016-12-09 17:19:28 -08:00
parent c7c175b02d
commit c23e900a90
3 changed files with 7 additions and 9 deletions

View File

@ -37,12 +37,11 @@ ify() {
$@ | $ex
}
has() { which "$1" >&/dev/null && which "$1"; }
has() { which "$1" >/dev/null && which "$1"; }
# cleanup in case of inherited exports
for x in AR CC CPP CXX CFLAGS CPPFLAGS CXXFLAGS LDFLAGS RANLIB RC WINDRES; do
unset $x
done
unset PREFIX CC CPP CXX LD CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
unset AR RANLIB RC WINDRES OBJDUMP OBJCOPY COMPILER_PATH
[ "$LANG" != "en_US.UTF-8" ] && [ "$LANG" != "en_CA.UTF-8" ] && echo "Warning: LANG is $LANG"
@ -53,8 +52,8 @@ done
[[ "$DESKTOP_SESSION" == xfce ]] && export QT_QPA_PLATFORMTHEME=""
export PREFIX="$HOME/opt/local"
export CC="$(has clang || has clang-3.6 || has gcc)"
export CXX="$(has clang++ || has clang++-3.6 || has g++)"
export CC="$(has clang || has clang-3.8 || has gcc)"
export CXX="$(has clang++ || has clang++-3.8 || has g++)"
#export CFLAGS='-march=native -O2'
#export LDFLAGS='-Wl,-O1,--sort-common,-z,relro'
#export CFLAGS="$CFLAGS -I'$HOME/opt/local/include'"
@ -71,6 +70,7 @@ export EDITOR='vim'
for x in ls dir vdir grep fgrep egrep; do
alias $x="$x --color=auto"
done
unset x
#alias make="$(has colormake || has make)"
# just flags

View File

@ -28,7 +28,6 @@ ret_fail="$_title${Cfail}$_line1\n${Cfail}$_line2"
PROMPT_COMMAND='[ $? = 0 ] && PS1=${ret_succ} || PS1=${ret_fail}'
. ~/.-shrc
unset x
# this doesn't work for all scripts at the moment, but
ADDPATH "$HOME/sh"

View File

@ -137,6 +137,7 @@ for x in ack cd cp ebuild gcc gist grep ln man mkdir mv rm
alias $x="nocorrect $x"
for x in arith hex curl fc find ftp history let locate rsync scp sftp wget twitch hitbox yt
alias $x="noglob $x"
unset x
if [[ "$TERM" = xterm* ]]; then
precmd() { print -Pn "\e]2;%M: %~\a" }
@ -164,7 +165,5 @@ reload() {
exec zsh # reload shell, inheriting environment
}
unset x
[ -e "/home/$USER/opt/local/bin/torch-activate" ] && \
. "/home/$USER/opt/local/bin/torch-activate"