From a2690f9eebfd3b9118203a548c4eeccf6b78f7d5 Mon Sep 17 00:00:00 2001 From: xyz Date: Sun, 17 Oct 2021 00:05:01 -0700 Subject: combine cfgx to cfg, add chmod feature to cfg, update cfgx to cfg in scripts --- .bashrc | 1 + .local/bin/cfgc | 3 --- .local/bin/cfgl | 3 --- .local/bin/cfgs | 3 --- .local/bin/gita | 12 ++++++------ .local/bin/upd | 8 ++++---- 6 files changed, 11 insertions(+), 19 deletions(-) delete mode 100755 .local/bin/cfgc delete mode 100755 .local/bin/cfgl delete mode 100755 .local/bin/cfgs diff --git a/.bashrc b/.bashrc index a95f46ed..dadeefd4 100644 --- a/.bashrc +++ b/.bashrc @@ -38,6 +38,7 @@ alias sdcv='sdcv --color' # /dev/ttyACM0 can be in config file, or as environmantal variable, see /usr/share/doc/adafruit-ampy/README.md alias ap='sudo ampy -p /dev/ttyACM0' +alias c='cfg' alias g=git alias ll='ls -lAh --color=auto --group-directories-first' alias s='sudo ' # https://askubuntu.com/a/22043 diff --git a/.local/bin/cfgc b/.local/bin/cfgc deleted file mode 100755 index 41b61a1e..00000000 --- a/.local/bin/cfgc +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -git --git-dir="$HOME/.mycfg_cross_platform/" --work-tree="$HOME" "$@" diff --git a/.local/bin/cfgl b/.local/bin/cfgl deleted file mode 100755 index d1eba360..00000000 --- a/.local/bin/cfgl +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -git --git-dir="$HOME/.mycfg_local/" --work-tree="$HOME" "$@" diff --git a/.local/bin/cfgs b/.local/bin/cfgs deleted file mode 100755 index 4133a790..00000000 --- a/.local/bin/cfgs +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -git --git-dir="$HOME/.mycfg_local_secrets/" --work-tree="$HOME" "$@" diff --git a/.local/bin/gita b/.local/bin/gita index 6f5dc76c..c3d8520c 100755 --- a/.local/bin/gita +++ b/.local/bin/gita @@ -5,9 +5,9 @@ cmd='git' while getopts cls f; do case $f in - c) cmd='cfgc';; - l) cmd='cfgl';; - s) cmd='cfgs';; + c) cmd='cfg -c';; + l) cmd='cfg -l';; + s) cmd='cfg -s';; \?) exit 1;; esac done @@ -15,6 +15,6 @@ shift $((OPTIND-1)) mes="${1:-refactor}" -"$cmd" add -u -"$cmd" commit -m "$mes" -"$cmd" push +$cmd add -u +$cmd commit -m "$mes" +$cmd push diff --git a/.local/bin/upd b/.local/bin/upd index b759b44d..65452b37 100755 --- a/.local/bin/upd +++ b/.local/bin/upd @@ -51,7 +51,7 @@ g () misc () { - cfgc submodule foreach git pull + cfg -c submodule foreach git pull nvim +PlugUpgrade +PlugClean! +PlugUpdate +qa tldr --update sudo hardcode-fixer @@ -89,9 +89,9 @@ refl () usb () { - cfgc push usb - cfgl push usb - cfgs push + cfg -c push usb + cfg -l push usb + cfg -s push git --git-dir="$XDG_DOCUMENTS_DIR/notes/.git" --work-tree="$XDG_DOCUMENTS_DIR/notes/" push usb } -- cgit v1.2.3-70-g09d2