-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_stuff.sh
More file actions
executable file
·53 lines (42 loc) · 1.22 KB
/
Copy pathinstall_stuff.sh
File metadata and controls
executable file
·53 lines (42 loc) · 1.22 KB
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
#!/bin/bash
# Run this script: source install_stuff.sh
install_path="$HOME/bin"
bashrc_path="$HOME/.bashrc"
update_bashrc="false"
mkdir -p $install_path
shell_scripts=(
"ami"
"create_code_file"
"arch_linux_cleaner"
"algu"
"git_puller"
)
# g++ cpp/git_puller.cpp -static -std=c++20 -o $install_path/git_puller
# ln -f python/git_puller.py ~
for shell_script in ${shell_scripts[@]}; do
ln -f shell-scripts/$shell_script.sh $install_path/$shell_script
done
echo $PATH | grep -q $install_path
if [[ $? == "1" ]]; then
{
echo ""
echo 'export PATH="$PATH:$HOME/bin"'
} >> $bashrc_path
update_bashrc="true"
fi
alias | grep -qE 'greenterm|sync_time|clear_bash_history|py_server'
if [[ $? == "1" ]]; then
{
echo ""
echo "alias greenterm='setterm -fore green -back black -store'"
echo "alias sync_time='sudo timedatectl set-ntp true'"
echo "alias clear_bash_history='history -c && history -w'"
echo "alias py_server='python -m http.server 8000 --bind 127.0.0.1'"
# echo "alias git_puller='python ~/git_puller.py'"
} >> $bashrc_path
update_bashrc="true"
fi
if [[ $update_bashrc == "true" ]]; then
source $bashrc_path
fi
unset install_path bashrc_path update_bashrc shell_scripts shell_script