mirror of
https://github.com/notwa/rc
synced 2025-02-05 07:43:22 -08:00
clean up compiler and loop stuff
This commit is contained in:
parent
c7c175b02d
commit
c23e900a90
3 changed files with 7 additions and 9 deletions
12
home/-shrc
12
home/-shrc
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue