root / other-scripts / one-use / move-assos.sh @ d808fa20
1 |
#!/usr/bin/env bash |
---|---|
2 |
|
3 |
help=<<EOF |
4 |
This script takes 2 arguments: the old and new location of assos' bin directory. It remplace |
5 |
all occurences of the former emplacement are remplaced by the new one. |
6 |
EOF |
7 |
|
8 |
correct_path() { |
9 |
sed "s#$1#$2#" < $3 > $3.tmp |
10 |
mv $3.tmp $3 |
11 |
} |
12 |
|
13 |
|
14 |
# Bin |
15 |
for file in $(ls bin/*.sh) ; do |
16 |
correct_path $1 $2 $file |
17 |
done |
18 |
|
19 |
# drush aliases |
20 |
correct_path $1 $2 .drush/aliases.drushrc.php |