zsh: add alias and sdocker all X11 and usb access
This commit is contained in:
parent
a657ce8087
commit
870d7840d2
@ -20,7 +20,8 @@ alias ..='cd ..'
|
|||||||
alias ../..='cd ../..'
|
alias ../..='cd ../..'
|
||||||
alias ../../..='cd ../../..'
|
alias ../../..='cd ../../..'
|
||||||
alias greptag='grep --exclude=tags --exclude=cscope.out'
|
alias greptag='grep --exclude=tags --exclude=cscope.out'
|
||||||
alias logcat="adb logcat"
|
alias logcat="adb logcat -v time"
|
||||||
|
alias remount="adb root && adb remount"
|
||||||
alias xte='nohup xterm &' # xte lancera un xterm qui ne se fermera pas si on ferme le terminal
|
alias xte='nohup xterm &' # xte lancera un xterm qui ne se fermera pas si on ferme le terminal
|
||||||
alias minicom='minicom -c on'
|
alias minicom='minicom -c on'
|
||||||
alias vims='vim --servername vimserver'
|
alias vims='vim --servername vimserver'
|
||||||
|
@ -90,6 +90,10 @@ if [[ $BATTERY -gt 0 ]] ; then
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
repofind () {
|
||||||
|
find . -name .repo -prune -o -name .git -prune -o "$@" -print0
|
||||||
|
}
|
||||||
|
|
||||||
mgrep () {
|
mgrep () {
|
||||||
find . -name .repo -prune -o -name .git -prune -o -path ./out -prune -o -regextype posix-egrep -iregex '(.*\/Makefile|.*\/Makefile\..*|.*\.make|.*\.mak|.*\.mk|CMakeLists.txt)' -type f -print0 | xargs -0 grep --color -n "$@"
|
find . -name .repo -prune -o -name .git -prune -o -path ./out -prune -o -regextype posix-egrep -iregex '(.*\/Makefile|.*\/Makefile\..*|.*\.make|.*\.mak|.*\.mk|CMakeLists.txt)' -type f -print0 | xargs -0 grep --color -n "$@"
|
||||||
}
|
}
|
||||||
@ -274,7 +278,7 @@ sdocker (){
|
|||||||
img=$(docker ps -a | grep $1 | awk '{print $1}' | head -1);
|
img=$(docker ps -a | grep $1 | awk '{print $1}' | head -1);
|
||||||
if [ -z $img ]; then
|
if [ -z $img ]; then
|
||||||
echo "Running a new container"
|
echo "Running a new container"
|
||||||
docker run ${AOSP_ARGS} ${=SSH_AUTH_ARGS} -v ${AOSP_IMAGE}:/aosp/Project -v /home/mathieu/pixium/:/aosp/pixium/ -v /local/:/local/ -v /media/mmaret/data:/aosp/data -v /home/mathieu/miyoo/:/aosp/miyoo --user="$(id -u):$(id -g)" $1
|
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
|
||||||
else
|
else
|
||||||
echo "Starting $img"
|
echo "Starting $img"
|
||||||
docker start -i -a $img
|
docker start -i -a $img
|
||||||
|
Loading…
Reference in New Issue
Block a user