- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwork
More file actions
Latest commit
executable file
·20 lines (20 loc) · 566 Bytes
/
Copy pathwork
File metadata and controls
executable file
·20 lines (20 loc) · 566 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
cd~/dotfiles
if [ $#=="0" ]
then
echo"Module : $MODULE\nProjet : $PROJECT"
elif [ $1=="mod" ]
then
echo"Changement de module pour $2"
sed -i ".old"'s/MODULE='$MODULE'/MODULE='$2'/' .zshrc
elif [ $1=="proj" ]
then
echo"Changement de projet pour $2"
sed -i ".old"'s/PROJECT='$PROJECT'/PROJECT='$2'/' .zshrc
elif [ $1=='all' ]
then
echo"Changement de module pour $1f"
echo"Changement de projet pour $2"
mv .zshrc .zshrc.old
cat .zshrc.old | sed 's/MODULE='$MODULE'/MODULE='$2'/'| sed 's/PROJECT='$PROJECT'/PROJECT='$3'/'> .zshrc
fi