|
|
@ -1,13 +1,15 @@ |
|
|
|
#!/bin/bash |
|
|
|
|
|
|
|
VERSIONCOUNTER=308 |
|
|
|
SIMPLEVERSION="3.0 RC6";OIFS=$IFS; |
|
|
|
VERSIONCOUNTER=310 |
|
|
|
SIMPLEVERSION="3.0 RC7";OIFS=$IFS; |
|
|
|
export NCURSES_NO_UTF8_ACS=1; |
|
|
|
|
|
|
|
#set dir_vars |
|
|
|
workdir="$(pwd)"; |
|
|
|
svndir="$workdir/oscam-svn"; |
|
|
|
workdir="$(pwd)"; |
|
|
|
bindir="$sdir/upx"; |
|
|
|
PATH="$bindir:$PATH"; |
|
|
|
sdir="$workdir/support"; |
|
|
|
|
|
|
|
osdir="$sdir/os"; |
|
|
|
ldir="$sdir/logs"; |
|
|
|
adir="$sdir/archive"; |
|
|
@ -21,15 +23,15 @@ configdir="$sdir/configs"; |
|
|
|
bsvn="$sdir/backup_svn"; |
|
|
|
tcdir="$sdir/toolchains"; |
|
|
|
tdir="$sdir/translation"; |
|
|
|
svndir="$workdir/oscam-svn"; |
|
|
|
tccfgdir="$sdir/toolchains.cfg"; |
|
|
|
bindir="$sdir/upx"; |
|
|
|
PATH="$bindir:$PATH"; |
|
|
|
|
|
|
|
# create folders |
|
|
|
mkdir -p support/{archive,binaries,configs,downloads,functions,logs,os,patches,profiles,toolchains,toolchains.cfg,translation,backup_svn,menu_save,upx} 2>/dev/null; |
|
|
|
mkdir -p "$tcdir/native/bin" 2>/dev/null; |
|
|
|
mkdir -p support/{archive,binaries,downloads,logs,patches,backup_svn,menu_save,upx} 2>/dev/null; |
|
|
|
|
|
|
|
# create links |
|
|
|
[ ! -d "$ldir" ] && clear && echo -e "\n folder creation error\n\n" && exit; |
|
|
|
[ -L "$workdir/logs" ] || ln -sf "$ldir" "$workdir/logs" 2>/dev/null; |
|
|
|
[ -L "$workdir/archive" ] || ln -sf "$adir" "$workdir/archive" 2>/dev/null; |
|
|
|
[ -L "$workdir/patches" ] || ln -sf "$pdir" "$workdir/patches" 2>/dev/null; |
|
|
@ -37,7 +39,9 @@ mkdir -p "$tcdir/native/bin" 2>/dev/null; |
|
|
|
[ -L "$workdir/profiles" ] || ln -sf "$profdir" "$workdir/profiles" 2>/dev/null; |
|
|
|
|
|
|
|
#set arrays |
|
|
|
array_names_a=( SHORT_PROTOCOLS SHORT_READERS SHORT_CARD_READERS AVAI_TCLIST MISS_TCLIST SHORT_ADDONS DISABLED_MODULES SHORT_MODULENAMES ALL_MODULES_LONG ENABLED_MODULES INST_TCLIST SSH_CONF_CONTENT ) |
|
|
|
array_names_a=( SHORT_PROTOCOLS SHORT_READERS SHORT_CARD_READERS AVAI_TCLIST |
|
|
|
MISS_TCLIST SHORT_ADDONS DISABLED_MODULES SHORT_MODULENAMES |
|
|
|
ALL_MODULES_LONG ENABLED_MODULES INST_TCLIST SSH_CONF_CONTENT ) |
|
|
|
array_names_A=( INTERNAL_MODULES USE_vars USE_vars_disable s3cfg_vars ) |
|
|
|
|
|
|
|
for a_n in "${array_names_a[@]}"; do |
|
|
@ -69,7 +73,9 @@ s3cfg_vars[delete_oscamdebugbinary]=1; |
|
|
|
|
|
|
|
#filled arrays |
|
|
|
config_cases=( all addons protocols readers card_readers ); |
|
|
|
s3opts=( cedit checkout clean enable_emu fix_me get_patch help lang_select loadonly menu profiles ssh_profiles svnpatch svnrestore svnup syscheck sysinfo tccheck tcrepair tedit update update_emu update_me upload ) # extendable with plugins |
|
|
|
s3opts=( cedit checkout clean enable_emu fix_me get_patch help lang_select loadonly\ |
|
|
|
menu profiles ssh_profiles svnpatch svnrestore svnup syscheck sysinfo tccheck\ |
|
|
|
tcrepair tedit update update_emu update_me upload ) # extendable with plugins |
|
|
|
|
|
|
|
CUSTOM_CONFDIR="not_set"; |
|
|
|
pf_name="not_set"; |
|
|
@ -89,6 +95,7 @@ cc_opts="-ggdb -pipe -ffunction-sections -fdata-sections"; |
|
|
|
#default url |
|
|
|
trunkurl="http://www.streamboard.tv/svn/oscam/trunk"; |
|
|
|
#trunkurl="http://www.streamboard.tv/svn/oscam-addons/modern"; |
|
|
|
|
|
|
|
[ -f "$workdir/oscamsource.url" ] && source "$workdir/oscamsource.url"; |
|
|
|
|
|
|
|
#load translationlist |
|
|
@ -101,7 +108,7 @@ if [ -d "$fdir" ];then |
|
|
|
for i in "${x[@]}";do |
|
|
|
source "$i"; |
|
|
|
plugin=$(awk '/^#simplebuild_plugin/ {printf $2}' $i); |
|
|
|
[ ! -z "$plugin" ] && s3opts+=($plugin); |
|
|
|
[ -z "$plugin" ] || s3opts+=($plugin); |
|
|
|
done; |
|
|
|
else |
|
|
|
echo "fail functions"; |
|
|
@ -125,8 +132,7 @@ _systype; # check used uname |
|
|
|
|
|
|
|
if [ ! -n "$1" ];then |
|
|
|
[ "${s3cfg_vars[DIRECTMENU]}" == "1" ] && _dialog_checkout && exit; |
|
|
|
_help; |
|
|
|
exit; |
|
|
|
_help; exit; |
|
|
|
else |
|
|
|
for e in "${s3opts[@]}";do |
|
|
|
if [ "$e" == "$1" ];then |
|
|
@ -136,7 +142,7 @@ else |
|
|
|
eval "$e"; |
|
|
|
else |
|
|
|
eval "$e" "$2"; |
|
|
|
fi;exit;; |
|
|
|
fi; exit;; |
|
|
|
menu) |
|
|
|
if [ ! -n "$2" ];then |
|
|
|
_dialog_checkout; |
|
|
|