54 lines
1.4 KiB
Bash
54 lines
1.4 KiB
Bash
#!/bin/bash
|
|
|
|
function loadIndication() {
|
|
while [ -d "/proc/$1" ]
|
|
do #Current PID in /proc |
|
|
echo -en "Loading... /\033[1G"; sleep .07
|
|
echo -en "Loading... -\033[1G"; sleep .07
|
|
echo -en "Loading... / \033[1G"; sleep .07
|
|
echo -en "Loading... |\033[1G"; sleep .07
|
|
done
|
|
}
|
|
|
|
function loadIndicationFile() {
|
|
while [ ! -e $1 ]
|
|
do
|
|
echo -en "$VERT Load... /\033[1G"; sleep .07
|
|
echo -en "$ROUGE Load... -\033[1G"; sleep .07
|
|
echo -en "$CYAN Load... / \033[1G"; sleep .07
|
|
echo -en "$NORMAL Load... |\033[1G"; sleep .07
|
|
done
|
|
}
|
|
|
|
function createIndexeFile() {
|
|
if [$2 = "true"];then
|
|
index=$2
|
|
else
|
|
index=$1
|
|
fi
|
|
case $index in
|
|
"ent")
|
|
`cp files/SdIndexe/$index.conf indexeConf/$index.sphinx.conf`
|
|
;;
|
|
"act")
|
|
`cp files/SdIndexe/$index.conf indexeConf/$index.sphinx.conf`
|
|
;;
|
|
"dir")
|
|
`cp files/SdIndexe/$index.conf indexeConf/$index.sphinx.conf`
|
|
;;
|
|
"comptage")
|
|
`cp files/SdIndexe/$index.conf indexeConf/$index.sphinx.conf`
|
|
;;
|
|
*)
|
|
`cp files/generic.sphinx.conf indexeConf/$index.sphinx.conf`
|
|
`sed -e "s/xindex/$index/g" -i indexeConf/$index.sphinx.conf`
|
|
esac
|
|
if [ $2 == "true" ]
|
|
then
|
|
`cat indexeConf/sphinx.conf > tmp`
|
|
`cat indexeConf/$index.sphinx.conf > indexeConf/sphinx.conf`
|
|
`cat tmp >> indexeConf/sphinx.conf`
|
|
else
|
|
`cat indexeConf/$index.sphinx.conf >> indexeConf/sphinx.conf`
|
|
fi
|
|
} |