updates for --help
This commit is contained in:
13
checkin-all
13
checkin-all
@@ -4,6 +4,19 @@ set -euo pipefail
|
|||||||
INTERACTIVE=true
|
INTERACTIVE=true
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
|
--help|-h)
|
||||||
|
cat <<'EOF'
|
||||||
|
Usage: checkin-all [options]
|
||||||
|
|
||||||
|
Check git status for all repos matching *schmeeve* in ~/git/,
|
||||||
|
and interactively prompt to commit & push changes.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-n, --no-interactive Auto-commit changes with timestamp message
|
||||||
|
-h, --help Show this help message and exit
|
||||||
|
EOF
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
--no-interactive|-n) INTERACTIVE=false ;;
|
--no-interactive|-n) INTERACTIVE=false ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|||||||
16
pull-all
16
pull-all
@@ -1,6 +1,22 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
for arg in "$@"; do
|
||||||
|
case "$arg" in
|
||||||
|
--help|-h)
|
||||||
|
cat <<'EOF'
|
||||||
|
Usage: pull-all [options]
|
||||||
|
|
||||||
|
Pull latest changes for all repos matching *schmeeve* in ~/git/.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-h, --help Show this help message and exit
|
||||||
|
EOF
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
GIT_HOME="${HOME}/git"
|
GIT_HOME="${HOME}/git"
|
||||||
|
|
||||||
for dir in "${GIT_HOME}"/*/ "${HOME}/Dotfiles"; do
|
for dir in "${GIT_HOME}"/*/ "${HOME}/Dotfiles"; do
|
||||||
|
|||||||
@@ -9,6 +9,22 @@
|
|||||||
#
|
#
|
||||||
# Adjust SHARE and SUBPATH to match your environment.
|
# Adjust SHARE and SUBPATH to match your environment.
|
||||||
|
|
||||||
|
for arg in "$@"; do
|
||||||
|
case "$arg" in
|
||||||
|
--help|-h)
|
||||||
|
cat <<'EOF'
|
||||||
|
Usage: sync-pictures [options]
|
||||||
|
|
||||||
|
Sync ~/Pictures to a NAS share and run neatcli organize on both ends.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-h, --help Show this help message and exit
|
||||||
|
EOF
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
SHARE="//mini.nas/miniShare1"
|
SHARE="//mini.nas/miniShare1"
|
||||||
SUBPATH="Pictures"
|
SUBPATH="Pictures"
|
||||||
MOUNTPOINT="${HOME}/mnt/miniShare1"
|
MOUNTPOINT="${HOME}/mnt/miniShare1"
|
||||||
|
|||||||
@@ -13,6 +13,22 @@
|
|||||||
#
|
#
|
||||||
# Adjust SHARE, SUBPATH, and SOURCE to match your environment.
|
# Adjust SHARE, SUBPATH, and SOURCE to match your environment.
|
||||||
|
|
||||||
|
for arg in "$@"; do
|
||||||
|
case "$arg" in
|
||||||
|
--help|-h)
|
||||||
|
cat <<'EOF'
|
||||||
|
Usage: sync-webgoggles [options]
|
||||||
|
|
||||||
|
Sync ~/webGoggles to a NAS share, with deduplication and old-session thinning.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-h, --help Show this help message and exit
|
||||||
|
EOF
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
SHARE="//ts.nas/aura"
|
SHARE="//ts.nas/aura"
|
||||||
SUBPATH="webGoggles"
|
SUBPATH="webGoggles"
|
||||||
MOUNTPOINT="${HOME}/mnt/ts.nas/aura"
|
MOUNTPOINT="${HOME}/mnt/ts.nas/aura"
|
||||||
@@ -46,7 +62,16 @@ else
|
|||||||
echo "[sync-webgoggles] Mounted at ${MOUNTPOINT}"
|
echo "[sync-webgoggles] Mounted at ${MOUNTPOINT}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 2. One-way rsync of SOURCE into the share subpath
|
# 2. Run pick-most-skin on local source to find best screenshot per user
|
||||||
|
PICK_SCRIPT="$(dirname "$0")/pick-most-skin"
|
||||||
|
if [ -x "${PICK_SCRIPT}" ]; then
|
||||||
|
echo "[sync-webgoggles] Running ${PICK_SCRIPT} ${SOURCE}"
|
||||||
|
"${PICK_SCRIPT}" "${SOURCE}"
|
||||||
|
else
|
||||||
|
echo "[sync-webgoggles] Warning: ${PICK_SCRIPT} not found, skipping"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 3. One-way rsync of SOURCE into the share subpath
|
||||||
MP="${MOUNTPOINT}/${SUBPATH}"
|
MP="${MOUNTPOINT}/${SUBPATH}"
|
||||||
mkdir -p "${MP}"
|
mkdir -p "${MP}"
|
||||||
echo "[sync-webgoggles] Syncing ${SOURCE}/ → ${MP}/"
|
echo "[sync-webgoggles] Syncing ${SOURCE}/ → ${MP}/"
|
||||||
@@ -58,7 +83,7 @@ rsync -vrau \
|
|||||||
--exclude=".DS_Store" \
|
--exclude=".DS_Store" \
|
||||||
--progress --stats
|
--progress --stats
|
||||||
|
|
||||||
# 3. Cleanup: deduplicate and thin old screenshots on destination
|
# 4. Cleanup: deduplicate and thin old screenshots on destination
|
||||||
cleanup_destination() {
|
cleanup_destination() {
|
||||||
local dest="$1"
|
local dest="$1"
|
||||||
local thin_days="${2:-42}" # default 6 weeks
|
local thin_days="${2:-42}" # default 6 weeks
|
||||||
|
|||||||
Reference in New Issue
Block a user