Compare commits
12
Commits
stage
..
500db502cc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
500db502cc | ||
|
|
4f28529537 | ||
|
|
4c5f9eca37 | ||
|
|
6b8e9c0596 | ||
|
|
76fa85cbc0 | ||
|
|
dc3bdb1c82 | ||
|
|
17fe6ba2a4 | ||
|
|
d905cb1474 | ||
|
|
eedc765074 | ||
|
|
7d693a9186 | ||
|
|
3119920c9f | ||
|
|
4a641adb03 |
No files matched your search
@@ -127,9 +127,14 @@ export PROJECT_TERMUX="$HOME/.git-env-termux"
|
||||
function test-termux {
|
||||
if [[ -d "$PROJECT_TERMUX" ]]; then
|
||||
log "`date` - Updating '$PROJECT_TERMUX'.\n"
|
||||
echo " Switching to '$BRANCH'."
|
||||
git -C "$PROJECT_TERMUX" switch "$BRANCH"
|
||||
echo " Pulling with submodules."
|
||||
git -C "$PROJECT_TERMUX" pull --recurse-submodules || \
|
||||
( echo "Failed to pull project, exiting." && return 1 )
|
||||
# Something above is doing a 'D setup.sh', so ensure it gets recreated.
|
||||
echo " Ensuring setup.sh exists."
|
||||
git -C "$PROJECT_TERMUX" restore setup.sh
|
||||
else
|
||||
log "`date` - Downloading '$PROJECT_TERMUX'.\n"
|
||||
git clone https://git.hyperling.com/me/env-termux \
|
||||
@@ -234,7 +239,7 @@ alias goodbye="update -y && bye"
|
||||
|
||||
## Video Related ##
|
||||
|
||||
alias pull-content="mv -v $SS/DCIM/Camera/`date +"%Y-%m-%d"`* ./raw/"
|
||||
alias pull-content="mv -v $SS/DCIM/Camera/`date +"%Y-%m-%d"`* $SS/DCIM/OpenCamera/`date +"%Y%m%d"`* ./raw/"
|
||||
|
||||
alias pull-screenshots="mv -v $SS/Pictures/Screenshots/*`date +"%Y%m%d"`* ./raw/"
|
||||
alias pull-screenshot="pull-screenshots"
|
||||
@@ -354,6 +359,60 @@ alias pull-prod="pull_prod_backups"
|
||||
alias prod-pull="pull_prod_backups"
|
||||
|
||||
|
||||
## Root Workflows ##
|
||||
|
||||
function go-root {
|
||||
command="$1"
|
||||
if [[ -z "$command" ]]; then
|
||||
su
|
||||
else
|
||||
su -c "$command"
|
||||
fi
|
||||
}
|
||||
alias root="go-root "
|
||||
alias doas-root="go-root "
|
||||
|
||||
plex_dir='/data/user/0/com.plexapp.android/Plex Media Server/Sync/1'
|
||||
plex_movie_dir="$plex_dir"/1
|
||||
plex_series_dir="$plex_dir"/2
|
||||
function plex {
|
||||
if [[ "$LOGNAME" == "root" ]]; then
|
||||
cd "$plex_dir"
|
||||
else
|
||||
echo "Hopping into root, use this to go to plex's directory: "
|
||||
echo "cd '$plex_dir'"
|
||||
su
|
||||
fi
|
||||
}
|
||||
function pull-plex {
|
||||
dest="$1"
|
||||
if [[ -z "$dest" ]]; then
|
||||
dest=/sdcard/Movies/
|
||||
fi
|
||||
|
||||
su -c "cp -Rv '$plex_dir'/{1,2}/* '$dest'"
|
||||
|
||||
cd "$dest"
|
||||
ls | while read dir; do
|
||||
echo "Checking '$dir'"
|
||||
cd "$dir"
|
||||
ls -lh
|
||||
# Unsure why -e and -f don't work here. Spaces in filenames? Globs?
|
||||
if [[ `ls *.chunk0 2>/dev/null` ]]; then
|
||||
final="movie.mkv"
|
||||
echo "Catting files together to make '$final'."
|
||||
|
||||
cat *.chunk* > $final
|
||||
ls -lh $final
|
||||
|
||||
rm -v *.chunk*
|
||||
fi
|
||||
cd ..
|
||||
done
|
||||
}
|
||||
alias get-plex="pull-plex"
|
||||
|
||||
|
||||
## Finalize ##
|
||||
|
||||
# Export all functions! #
|
||||
|
||||
@@ -42,7 +42,7 @@ fi
|
||||
|
||||
echo -e "\n`date` - Install & Updayte Crtical Software"
|
||||
pkg install -y \
|
||||
openssh tsu vim htop git cronie man zip ncurses-utils \
|
||||
openssh tsu vim htop git cronie man zip ncurses-utils which \
|
||||
nmap traceroute wget rsync \
|
||||
ffmpeg imagemagick \
|
||||
kotlin php nodejs python libllvm hugo
|
||||
|
||||
Reference in new issue
Block a user