-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup
More file actions
99 lines (88 loc) · 2.79 KB
/
setup
File metadata and controls
99 lines (88 loc) · 2.79 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/bin/bash
readonly DEVDIR=$HOME/.Dev
readonly CURRDIR=`pwd`
readonly BASH_ADDON=$DEVDIR/devFunction
echo -e "Creating required Directories..."
mkdir $DEVDIR
if [ -d $DEVDIR ]
then
echo -e "Adding files to $DEVDIR"
sleep 0.5
echo -e "Added bash.sh file..."
cp bash.sh $DEVDIR; sleep 0.5
echo -e "Added py.py file..."
cp py.py $DEVDIR; sleep 0.5
echo -e "Added c.c file..."
cp c.c $DEVDIR; sleep 0.5
echo -e "Added cpp.c++ file..."
cp cpp.c++ $DEVDIR; sleep 0.5
echo -e "Added java.java file..."
cp java.java $DEVDIR; sleep 0.5
echo -e "Added html.html file..."
cp html.html $DEVDIR; sleep 0.5
echo -e "Added Makefile..."
cp Makefile $DEVDIR; sleep 0.5
echo -e "Added devFunction file..."
cp devFunction $DEVDIR; sleep 0.5
echo -e "Added setup file..."
cp setup $DEVDIR; sleep 0.5
echo -e "Added setup.sh file..."
cp setup.sh $DEVDIR; sleep 0.5
echo -e "Added removeDev file..."
cp removeDev $DEVDIR; sleep 0.5
echo -e "Added removeDev.sh file..."
cp removeDev.sh $DEVDIR; sleep 0.5
else
echo -e "Error creating $DEVDIR"
exit
fi
cd $DEVDIR
echo -e ""
echo -e "Setting up user's name"
sed -i 's/Jorge Cardona/'$USER'/g' ./*.*
sleep 0.5
cd $HOME
echo -e "Setting up .bashrc"
cp .bashrc .bashrc.no.dev
#DO NOT CHANGE >> TO >
cat $BASH_ADDON >> .bashrc
sleep 0.5
. .bashrc
sleep 0.5
cd $CURRDIR
echo -e ""
echo -e "+++++++++++++++++ dev Command +++++++++++++++++++"
echo -e "+ \t\t+"
echo -e "+ All set up completed. \t\t+"
echo -e "+ \t\t+"
echo -e "+ Usage: $ dev filename.* \t\t+"
echo -e "+ Supported file extentions are:\t\t+"
echo -e "+\t .c\t.c++ or .cpp\t.java\t.py +"
echo -e "+\t .sh and .html \t\t+"
echo -e "+ \t\t+"
echo -e "+ Files where stored at: \t\t+"
echo -e "+ $DEVDIR +"
echo -e "+ \t\t+"
echo -e "+ To remove the 'dev' command: \t\t+"
echo -e "+ cd $DEVDIR +"
echo -e "+ then run the command: make clean \t\t+"
echo -e "+ \t\t+"
echo -e "+ Re+open terminal to see changes\t\t+"
echo -e "+ \t\t+"
echo -e "+++++++++++++++++++++ END +++++++++++++++++++++++"
echo -e ""
echo -e "Done!"
echo -e ""
echo -e "
NOTE:
To change the default editor, navigate to:
\tcd $HOME
and edit at the bottom of .bashrc:
EDITOR='emacs'
#EDITOR='vim'
#EDITOR='vi'
#EDITOR='nano'
#EDITOR='pico'
with your deciered Text editor"
echo -e ""
sleep 0.5