Skip to content

Instantly share code, notes, and snippets.

@dongkwan-kim
Last active September 4, 2017 07:31
Show Gist options
  • Save dongkwan-kim/c51f52373debc3024d17f46077842124 to your computer and use it in GitHub Desktop.
Save dongkwan-kim/c51f52373debc3024d17f46077842124 to your computer and use it in GitHub Desktop.
bashrc for pintos
# for git
alias gitpintos="git clone git@github.com:todoaskit/pintos.git"
# for pinto settings
alias pintosrun="pintos -v --bochs -- -q run"
# indivisual test
result() {
make
echo ""
make build/tests/$1.result
}
# project 1
alias threadsrun="cd ~/pintos/src/threads && pintosrun"
alias threadsmake="cd ~/pintos/src/threads/build && make"
alias cdthread="cd ~/pintos/src/threads"
alias cdtestthread="cd ~/pintos/src/tests/threads"
alias vithgrade="vi ~/pintos/src/threads/build/grade"
alias vithresults="vi ~/pintos/src/threads/build/results"
alias vitimerc="vi ~/pintos/src/devices/timer.c"
alias vitimerh="vi ~/pintos/src/devices/timer.h"
alias vithreadc="vi ~/pintos/src/threads/thread.c"
alias vithreadh="vi ~/pintos/src/threads/thread.h"
alias visynchc="vi ~/pintos/src/threads/synch.c"
alias visynchh="vi ~/pintos/src/threads/synch.h"
# file system setting
alias pintosfq="pintos -f -q"
alias pintoscopyecho="pintos -p ~/pintos/src/examples/echo -a echo -- -q"
alias pintosecho="pintos -v -k -T 60 --qemu --fs-disk=2 -p ../examples/echo -a echo -- -q -f run 'echo x'"
# project 2
alias viusgrade="vi ~/pintos/src/userprog/build/grade"
alias viusresults="vi ~/pintos/src/userprog/build/results"
alias cduserprog="cd ~/pintos/src/userprog"
alias visyscallc="vi ~/pintos/src/userprog/syscall.c"
alias visyscallh="vi ~/pintos/src/userprog/syscall.h"
alias viprocessc="vi ~/pintos/src/userprog/process.c"
alias viprocessh="vi ~/pintos/src/userprog/process.h"
alias viexceptionc="vi ~/pintos/src/userprog/exception.c"
alias viexceptionh="vi ~/pintos/src/userprog/exception.h"
# for zombile grep
alias zombie="ps aux | grep bochs | grep 1"
# for submit
# usage $ zippintos [teamno] [projectno]
function zippintos() {
cd ~/pintos
tar -czvf $1_project$2.tar.gz src document
}
# my setting
alias vi="vim"
export PATH=$PATH:/home/1b/pintos/src/utils
export TERM=xterm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment