mirror of
https://github.com/notwa/rc
synced 2024-04-25 17:03:23 -07:00
Compare commits
3 Commits
1b6bb206f8
...
f6be7c50c4
Author | SHA1 | Date | |
---|---|---|---|
Connor Olding | f6be7c50c4 | ||
Connor Olding | fec9a8391b | ||
Connor Olding | 438d36a8f1 |
26
home/-shrc
26
home/-shrc
|
@ -14,7 +14,7 @@ ify() {
|
|||
if which sudo >/dev/null 2>/dev/null; then
|
||||
alias maybesudo=sudo
|
||||
else
|
||||
function maybesudo() {
|
||||
maybesudo() {
|
||||
while [[ "$1" == -* ]]; do shift; done
|
||||
"$@"
|
||||
}
|
||||
|
@ -67,10 +67,10 @@ unset AR RANLIB RC WINDRES OBJDUMP OBJCOPY
|
|||
unset LD_LIBRARY_PATH
|
||||
|
||||
# PuTTY over serial
|
||||
[[ "$TERM" == vt102 ]] && export TERM="xterm"
|
||||
test "$TERM" = vt102 && export TERM="xterm"
|
||||
|
||||
# Qt is stupid and thinks we're running unity so it hides the menu bar
|
||||
[[ "$DESKTOP_SESSION" == xfce ]] && export QT_QPA_PLATFORMTHEME=""
|
||||
test "$DESKTOP_SESSION" = xfce && export QT_QPA_PLATFORMTHEME=""
|
||||
|
||||
export EDITOR=vim
|
||||
export PAGER=less
|
||||
|
@ -170,6 +170,24 @@ pegg() {
|
|||
pippy "https://github.com/$1/$2/tarball/${3:-master}#egg=$2"
|
||||
}
|
||||
|
||||
bak() {
|
||||
if [ -s "$1.bak" ]; then
|
||||
bak "$1.bak"
|
||||
fi
|
||||
cp -p "$1" "$1.bak"
|
||||
}
|
||||
|
||||
baks() { # backup, timestamped
|
||||
local fp="$1"
|
||||
local now="$(date -u '+%y-%m-%d_%H-%M-%S')"
|
||||
local bak="$fp.$now.bak"
|
||||
if [ -s "$bak" ]; then
|
||||
echo "how in the hell? $bak already exists" >&2
|
||||
return
|
||||
fi
|
||||
cp -p "$fp" "$bak"
|
||||
}
|
||||
|
||||
# sources {{{1
|
||||
|
||||
if [ $FANCY -eq 1 ]; then
|
||||
|
@ -177,4 +195,4 @@ if [ $FANCY -eq 1 ]; then
|
|||
source ~/.streamcrap
|
||||
fi
|
||||
|
||||
source ~/.ea
|
||||
. ~/.ea
|
||||
|
|
|
@ -142,8 +142,8 @@ compile() {
|
|||
maybe_include() {
|
||||
[ -d "$1" ] && our_flags+=("-I$1")
|
||||
}
|
||||
maybe_include "$HOME/opt/local/include"
|
||||
maybe_include "$HOME/src/ustl"
|
||||
#maybe_include "$HOME/opt/local/include"
|
||||
#maybe_include "$HOME/src/ustl"
|
||||
|
||||
# set the build flags for each mode.
|
||||
if [ $CC = cl ]; then
|
||||
|
|
Loading…
Reference in New Issue
Block a user