zsh: alias update
This commit is contained in:
parent
d6e7105017
commit
e302ae266e
@ -232,6 +232,16 @@ croot ()
|
||||
fi
|
||||
}
|
||||
|
||||
syswrite ()
|
||||
{
|
||||
adb wait-for-device && adb root || return 1;
|
||||
if [[ -n $(adb disable-verity | grep "reboot") ]]; then
|
||||
echo "rebooting";
|
||||
adb reboot && adb wait-for-device && adb root || return 1;
|
||||
fi;
|
||||
adb wait-for-device && adb remount || return 1
|
||||
}
|
||||
|
||||
function zsh_stats() {
|
||||
fc -l 1 | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n20
|
||||
}
|
||||
@ -275,7 +285,7 @@ sdocker (){
|
||||
AOSP_ARGS=${AOSP_ARGS:--it}
|
||||
img=$(docker ps | grep $1 | awk '{print $1}');
|
||||
if [ -z $img ]; then
|
||||
img=$(docker ps -a | grep $1 | awk '{print $1}' | head -1);
|
||||
img=$(docker ps -a | grep -w $1 | awk '{print $1}' | head -1);
|
||||
if [ -z $img ]; then
|
||||
echo "Running a new container"
|
||||
docker run ${AOSP_ARGS} ${=SSH_AUTH_ARGS} -h $(hostname) -e DISPLAY=${DISPLAY} --privileged -v /dev/bus/usb:/dev/bus/usb -v /tmp/.X11-unix/:/tmp/.X11-unix/ -v ${AOSP_IMAGE}:/aosp/Project -v $HOME/Sources/:/aosp/Sources/ -v /local/:/local/ --user="$(id -u):$(id -g)" $1
|
||||
|
Loading…
Reference in New Issue
Block a user