-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bashrc
74 lines (60 loc) · 2.05 KB
/
.bashrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific environment
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
then
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
fi
export PATH
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
# User specific aliases and functions
# some of the following aliases and/or functions were taken from
# https://missing.csail.mit.edu/2020/command-line/
alias gs="git status"
alias gc="git commit"
alias gb="git blame"
alias gca="git commit --amend"
alias mv="mv -i"
alias df="df -h"
alias mkdir="mkdir -p"
mkcd () {
mkdir -p "$1"
cd "$1"
}
pullin () {
(cd $1 && git pull)
}
statin () {
(cd $1 && git status)
}
glg () {
git log --grep="$1"
}
gli () {
(cd $1 && git log)
}
# Install needed packages on Fedora. Basically the list required for
# Yocto development, plus some preferred editors and libraries for
# modeling.
getmytools () {
sudo dnf -y install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
sudo dnf -y install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install -y gawk make wget tar bzip2 gzip python3 unzip perl patch \
diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath \
ccache perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue perl-bignum socat \
python3-pexpect findutils which file cpio python python3-pip xz SDL-devel xterm \
tmux vim htop rpcgen python3-numpy python3-matplotlib ffmpeg python3-scipy
}
# Get key layers for Yocto development, plus some other useful ones
setupyp () {
git clone git://git.openembedded.org/openembedded-core
(cd openembedded-core && git clone git://git.openembedded.org/bitbake)
git clone git://git.openembedded.org/meta-openembedded
git clone git://git.yoctoproject.org/poky
git clone git://git.yoctoproject.org/meta-virtualization
git clone git://git.yoctoproject.org/meta-raspberrypi
}