1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-04-25 17:03:23 -07:00

Compare commits

...

3 Commits

Author SHA1 Message Date
Connor Olding f6be7c50c4 disable these includes i rarely use 2020-08-26 08:38:14 +02:00
Connor Olding fec9a8391b add simple backup functions 2020-08-26 08:37:45 +02:00
Connor Olding 438d36a8f1 restore ash compatibility 2020-08-26 08:37:28 +02:00
2 changed files with 24 additions and 6 deletions

View File

@ -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

View File

@ -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