modified: di_dialog.py
modified: di_main.py modified: ../main/setup
This commit is contained in:
35
main/setup
35
main/setup
@@ -38,21 +38,29 @@ usage(){
|
||||
}
|
||||
|
||||
config_execfile(){
|
||||
echo "#!/bin/bash" > ${work_write_dir}/${exec_file}
|
||||
echo "twm &" >> ${work_write_dir}/${exec_file}
|
||||
echo "cd ${workdir}" >> ${work_write_dir}/${exec_file}
|
||||
if [ -f ${work_write_dir}/install.xml ]; then
|
||||
echo "python check_oldconf.py -l $1 " >> ${work_write_dir}/${exec_file}
|
||||
if test "$1" == "dialog"
|
||||
then
|
||||
echo "#!/bin/bash" > ${work_write_dir}/${exec_file}
|
||||
echo "cd ${workdir}" >> ${work_write_dir}/${exec_file}
|
||||
echo "python di_main.py" >> ${work_write_dir}/${exec_file}
|
||||
else
|
||||
echo "#!/bin/bash" > ${work_write_dir}/${exec_file}
|
||||
echo "twm &" >> ${work_write_dir}/${exec_file}
|
||||
echo "cd ${workdir}" >> ${work_write_dir}/${exec_file}
|
||||
if [ -f ${work_write_dir}/install.xml ]; then
|
||||
echo "python check_oldconf.py -l $1 " >> ${work_write_dir}/${exec_file}
|
||||
fi
|
||||
echo "python ri_main.py -l $2 -c $configfile" >> ${work_write_dir}/${exec_file}
|
||||
fi
|
||||
echo "python ri_main.py -l $1 -c $configfile" >> ${work_write_dir}/${exec_file}
|
||||
}
|
||||
|
||||
main(){
|
||||
local style='graph'
|
||||
local language='chinese'
|
||||
local xstart='yes'
|
||||
local dialog=''
|
||||
|
||||
tmp=$(getopt -o c:s:l:nh --long style:,configfile:,language:,noXserver,help -- "$@")
|
||||
tmp=$(getopt -o c:dsl:nh --long style:,configfile:,language:,noXserver,help -- "$@")
|
||||
eval set -- "$tmp"
|
||||
|
||||
mkdir -p $work_write_dir
|
||||
@@ -60,7 +68,7 @@ main(){
|
||||
while true;do
|
||||
case "$1" in
|
||||
'-c'|'--configfile') configfile="$2" ; shift 2;;
|
||||
'-s'|'--style') type="$2" ;shift 2;;
|
||||
'-s'|'--style') xstart='no';style="dialog" ;workdir="$(pwd)/../dialog";shift ;;
|
||||
'-l'|'--language') language="$2" ;shift 2;;
|
||||
'-n'|'--noXserver') xstart='no' ;shift ;;
|
||||
'-h'|'--help') usage ; exit 0 ;;
|
||||
@@ -70,17 +78,16 @@ main(){
|
||||
done
|
||||
|
||||
if [ $style = 'graph' ]; then
|
||||
config_execfile "$language"
|
||||
config_execfile "$style" "$language"
|
||||
else
|
||||
:
|
||||
# text install
|
||||
config_execfile "$style"
|
||||
fi
|
||||
|
||||
if [ $xstart = 'yes' ]; then
|
||||
X -configure
|
||||
startx ${work_write_dir}/${exec_file} -- -config ~/xorg.conf.new
|
||||
X -configure
|
||||
startx ${work_write_dir}/${exec_file} -- -config ~/xorg.conf.new
|
||||
else
|
||||
bash ${work_write_dir}/${exec_file}
|
||||
bash ${work_write_dir}/${exec_file}
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user