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
|
#!/bin/sh environment_python(){ yum -y install python
echo "python OK " } environment_git(){ yum -y install git
echo "git OK"
} get_from_github(){ cd /root/
git clone https: //github .com /andreafrancia/trash-cli .git
echo "Download trash-cli OK"
} install_trash(){ echo "get to trash-cli "
cd /root/trash-cli
echo "Now in trash-cli"
python setup.py install
echo "python install trash-cli OK"
} alias_rm(){ alias rm = 'trash-put'
echo "alias rm='trash-put'"
source /etc/profile
echo "alias OK echo_to_profile OK"
} environment_python environment_git get_from_github install_trash alias_rm |
本文转自 angry_frog 51CTO博客,原文链接:http://blog.51cto.com/l0vesql/1940683