You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
653 B
26 lines
653 B
12 years ago
|
#!/bin/bash
|
||
|
|
||
|
#Создан: Вс 25 авг 2013 19:40:12
|
||
|
#Изменён: Ср 28 авг 2013 20:24:59
|
||
|
|
||
|
# Добавление файлов с меткой +GITIGNORE в исключения .git
|
||
|
|
||
|
# Метка должна располагаться не далее пятой колонки
|
||
|
\grep -E '^.{1,5}\+GITIGNORE' -R > /tmp/gitignore.tmp
|
||
|
|
||
|
if [ -f ".gitignore" ]; then
|
||
|
while read line; do
|
||
|
echo lll $line
|
||
|
sed -i "/${line//\//.}/d" /tmp/gitignore.tmp 2> /dev/null
|
||
|
done < .gitignore
|
||
|
fi
|
||
|
|
||
|
echo "\n# [ $(\date +%d.%m.%Y) ]\n" >> .gitignore
|
||
|
|
||
|
cut -d ':' -f 1 /tmp/gitignore.tmp | sort -u >> .gitignore
|
||
|
|
||
|
echo >> .gitignore
|
||
|
|
||
|
\rm /tmp/gitignore.tmp
|
||
|
|