setconfig.sh 593 Bytes
Newer Older
German Leon's avatar
German Leon committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#dir="/home/ubuntu/rodinia/lud/rad"
dir= `grep -v \# $HOME/dir_test`
sel=$(ls -l ${dir}/config.py|cut -f2 -d\>|cut -f2 -d/)
echo sel $sel

j=1
for i in $( ls ${dir}/configs )
do
#  echo "$i: " ${i}
#  echo "$sel: " ${sel}
  if [ ${i} = ${sel} ]
  then 
    echo -e "->\t" $[ $j + 0] $i
  else
    echo -e "\t" $[ $j + 0] $i 
  fi
  j=$[ $j + 1 ]
done

echo "Elige una opcion: "
read num
j=1
rm -f bamboo_fi

for i in $( ls ${dir}/configs)
do
  if [ ${j} -eq ${num} ]
  then
    rm -f ${dir}/config.pyc
    rm -f ${dir}/config.py
    ln -s "configs/"$i "./config.py"
  fi
  j=$[ $j + 1 ]
done