diff --git a/addons.sh b/addons.sh index 73f01f6..d33782c 100644 --- a/addons.sh +++ b/addons.sh @@ -23,13 +23,14 @@ sprj(){ # new project function new(){ prjroot="/cygdrive/p/project_notes/" + winprjroot="p:/project_notes/" editor="/cygdrive/c/Program Files/Sublime\ Text/subl.exe" if [[ -z $1 ]]; then echo 'i need the project name, bae'; exit 1; else prjname=$(echo $1|sed -e 's/ /-/g'); fi lastnum=$(find $prjroot. -type d -maxdepth 1 -iname "*[0-9]*" | grep -oP '(?<=\/)([0-9]+)(?=\.)' | sort | tail -1) prjnum=$(echo $lastnum | awk -F, '{printf("%04d",($lastnum".")+1)}') prjname="$prjnum.$prjname" mkdir -p $prjroot$prjname || echo "cannot mkdir '$prjroot$prjname'" && exit 1 - touch $prjroot$prjname/$prjname.txt && $editor $prjroot$prjname/$prjname.txt + touch $prjroot$prjname/$prjname.txt && $editor $winprjroot$prjname/$prjname.txt if [[ -f .git ]]; then git branch -b $prjname; else echo "no '.git' found"; fi } @@ -43,3 +44,5 @@ function gcq(){ if [[ -z $1 ]]; then msg="$(date +%F\ %T)"; else msg=$1; fi git commit -am "$msg" && read -n1 -p "push? [Y/n] " reply; if [[ $reply != [Nn] ]]; then git push; fi } + +alias gs='git status' diff --git a/restore-mysql-daily b/restore-mysql-daily index 6d8feff..354ec28 100644 --- a/restore-mysql-daily +++ b/restore-mysql-daily @@ -243,7 +243,7 @@ done if [[ $MASTER_HOST && $MASTER_USER && $MASTER_PASSWORD ]]; then hecko "\napplying configuration for replication\n\thost: $MASTER_HOST\n\tuser: $MASTER_USER" - xct "mysql -e 'CHANGE MASTER TO master_host=$MASTER_HOST,master_user=$MASTER_USER,master_password=$MASTER_PASSWORD;'" + xct 'mysql -e "CHANGE MASTER TO master_host=$MASTER_HOST,master_user=$MASTER_USER,master_password=$MASTER_PASSWORD;"' else hecko "\nwarning: replication credentials not present; this might be bad if replication host is not already configured" fi