18 lines
545 B
Bash
18 lines
545 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
file=$1
|
||
|
|
||
|
if [ -f ${file} ]; then
|
||
|
av=$( grep versionWeblinux ${file} | sed -e 's/.*<\/font>//' -e 's/<\/span>.*//' )
|
||
|
echo "Version actuelle : -->${av}<--"
|
||
|
echo -n "Entrez la version souhaitée : "
|
||
|
read nv
|
||
|
mv ${file} /tmp/index.$$
|
||
|
cat /tmp/index.$$ | sed -e 's/\(.*\)versionWeblinux\(.*\)<\/font>.*$/\1versionWeblinux\2<\/font>'${nv}'<\/span><\/td>/' > ${file}
|
||
|
av=$( grep versionWeblinux ${file} | sed -e 's/.*<\/font>//' -e 's/<\/span>.*//' )
|
||
|
echo "version set to ${av}"
|
||
|
else
|
||
|
echo "${file} not found"
|
||
|
fi
|
||
|
|