setup emacs script to allow for conditional sync based on a 2nd parm ; move to bash for easier logic code
This commit is contained in:
parent
697b72b6ba
commit
bb61751c12
|
@ -1,19 +1,30 @@
|
||||||
#!/data/data/com.termux/files/usr/bin/sh
|
#!/data/data/com.termux/files/usr/bin/bash
|
||||||
|
|
||||||
# debugging
|
# debugging
|
||||||
#echo $1
|
#echo $1
|
||||||
|
#echo $2
|
||||||
|
|
||||||
# get a wake lock so we dont get background killed
|
# get a wake lock so we dont get background killed
|
||||||
/data/data/com.termux/files/usr/bin/termux-wake-lock
|
/data/data/com.termux/files/usr/bin/termux-wake-lock
|
||||||
|
|
||||||
# nextcloud auto-sync
|
# sync nc -> local based on emacs profile and on/off arg
|
||||||
|
if [ "$1" == "org" ] && [ "$2" == "" ]; then
|
||||||
/data/data/com.termux/files/home/.shortcuts/rclone-nc-local
|
/data/data/com.termux/files/home/.shortcuts/rclone-nc-local
|
||||||
|
fi
|
||||||
|
if [ "$1" == "code" ] && [ "$2" != "" ]; then
|
||||||
|
/data/data/com.termux/files/home/.shortcuts/rclone-devdocs
|
||||||
|
fi
|
||||||
|
|
||||||
# run emacs ; assume this will run awhile -- mind battery drain
|
# run emacs ; assume this will run awhile -- mind battery drain
|
||||||
/data/data/com.termux/files/usr/bin/emacs --with-profile $1
|
/data/data/com.termux/files/usr/bin/emacs --with-profile $1
|
||||||
|
|
||||||
# nextcloud auto-sync
|
# sync local -> nc based on emacs profile and on/off arg
|
||||||
|
if [ "$1" == "org" ] && [ "$2" == "" ]; then
|
||||||
/data/data/com.termux/files/home/.shortcuts/rclone-local-nc
|
/data/data/com.termux/files/home/.shortcuts/rclone-local-nc
|
||||||
|
fi
|
||||||
|
# conditional here to save typing when it needs sestup
|
||||||
|
#if [ "$1" == "code" ] && [ "$2" != "" ]; then
|
||||||
|
#fi
|
||||||
|
|
||||||
# release wake lock
|
# release wake lock
|
||||||
/data/data/com.termux/files/usr/bin/termux-wake-unlock
|
/data/data/com.termux/files/usr/bin/termux-wake-unlock
|
||||||
|
|
Loading…
Reference in a new issue