prompt tweak

This commit is contained in:
Andrey Anurin
2018-08-13 22:27:21 +03:00
parent cb340786dc
commit 93dd19c367
3 changed files with 30 additions and 16 deletions

View File

@@ -1,5 +1,5 @@
function is_local {
local HOSTNAME=$(hostname)
local HOSTNAME="$(hostname)"
[[ "$HOSTNAME" =~ '^abra0' || "$HOSTNAME" == "svxf2-osx" ]]
}
@@ -155,7 +155,7 @@ function ffmpeg_timelapse {
}
function ffmpeg_timelapse_today {
local TODAY=$(date '+%Y-%m-%d')
local TODAY="$(date '+%Y-%m-%d')"
ffmpeg_timelapse "$TODAY" -preset ultrafast -crf 20
}
@@ -166,14 +166,14 @@ function update_.g {
return
fi
local RES=$(.g pull --no-stat 2>&1)
local RES="$(.g pull --no-stat 2>&1)"
if [[ $? != 0 ]]; then
# something went wrong
return
fi
if [[ ! ($RES =~ "Already up.to.date") ]]; then
if [[ ! $RES =~ "Already up.to.date" ]]; then
echo "Updated .g"
echo $RES
echo "======"