Browse Source
file update
update files for software building
pull/50/head
Gorgone
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
20 additions and
11 deletions
-
support/functions/_misc
-
support/functions/_plugin_update_toolchain
-
support/functions/_profiles
-
support/functions/_sys_check
|
|
@ -10,7 +10,7 @@ _nl(){ |
|
|
|
printf "$rs_\n" |
|
|
|
} |
|
|
|
_set_dialog_types(){ |
|
|
|
gui="$(which dialog)" |
|
|
|
gui="$(type -pf dialog)" |
|
|
|
st_="--stdout" |
|
|
|
ib_="--infobox" |
|
|
|
ip_="--inputbox" |
|
|
@ -104,14 +104,14 @@ e_addons(){ |
|
|
|
} |
|
|
|
sysinfo(){ |
|
|
|
printf "$g_l\nSYSTEM$w_l\n" |
|
|
|
system_info=$(which lsb_release) |
|
|
|
system_info=$(type -pf lsb_release) |
|
|
|
[ ${#system_info} -ge 11 ] && lsb_release -irc |
|
|
|
printf "Uptime:\t\t$(uptime -p)\n" |
|
|
|
printf "$g_l\nMEMORY$w_l\n" |
|
|
|
free -mht | awk '/Mem/{print "Memory:\t\tTotal: " $2 "Mb\tUsed: " $3 "Mb\tFree: " $4 "Mb"} /Swap/{print "Swap:\t\tTotal: " $2 "Mb\tUsed: " $3 "Mb\tFree: " $4 "Mb" }' |
|
|
|
[ -f /sys/dev/block ] && lsblk |
|
|
|
printf "$g_l\n CPU$w_l\n" |
|
|
|
cpu_info=$(which lscpu) |
|
|
|
cpu_info=$(type -pf lscpu) |
|
|
|
[ ${#cpu_info} -ge 5 ] && lscpu | grep -iE 'model name|vendor id|Architecture|per socket|MHz' |
|
|
|
printf "$g_l\nNetwork\n" |
|
|
|
printf "$w_l""Hostname:\t$HOSTNAME\n" |
|
|
|
|
|
@ -1211,7 +1211,7 @@ _create_config(){ |
|
|
|
if [ ! -f "$configtemplate" ];then #check existing config template file |
|
|
|
echo -e "${r_l}\nERROR -> ${txt_s3tup_msg_create_config_template_not_found}${re_}" && _paktc_timer 10; |
|
|
|
return 1; |
|
|
|
elif [ ! "$(which jq)" ];then #check existing jq |
|
|
|
elif [ ! "$(type -pf jq)" ];then #check existing jq |
|
|
|
echo -e "${r_l}\nCHECK -> ${txt_s3tup_msg_create_config_jq_not_found}\n${y_l}apt install jq\n${re_}" && _paktc_timer 10; |
|
|
|
return 1; |
|
|
|
else #copy the config template file |
|
|
|
|
|
@ -106,12 +106,21 @@ _create_native_profile(){ |
|
|
|
|
|
|
|
[ ! -d "$tcdir/native/bin" ] && mkdir -p "$tcdir/native/bin" |
|
|
|
cd "$tcdir/native/bin" |
|
|
|
g="$(which gcc)" |
|
|
|
stripvar="$(which strip)" |
|
|
|
strip_link="$($g -dumpmachine)-strip" |
|
|
|
g="$(type -pf gcc)" |
|
|
|
gpp="$(type -pf g++)" |
|
|
|
stripvar="$(type -pf strip)" |
|
|
|
if [ -f $g ]; then |
|
|
|
compiler_link="$($g -dumpmachine)-gcc" |
|
|
|
[ -L "$compiler_link" ] || ln -sf "$g" "$compiler_link" |
|
|
|
fi |
|
|
|
if [ -f $gpp ]; then |
|
|
|
gpp_link="$($g -dumpmachine)-g++" |
|
|
|
[ -L "$gpp_link" ] || ln -sf "$gpp" "$gpp_link" |
|
|
|
fi |
|
|
|
if [ -f $stripvar ]; then |
|
|
|
strip_link="$($g -dumpmachine)-strip" |
|
|
|
[ -L "$strip_link" ] || ln -sf "$stripvar" "$strip_link" |
|
|
|
fi |
|
|
|
cd "$tccfgdir" |
|
|
|
|
|
|
|
cat << EOF > native |
|
|
|
|
|
@ -13,7 +13,7 @@ prerequisites(){ |
|
|
|
do |
|
|
|
if hash "$e" 2>/dev/null |
|
|
|
then |
|
|
|
einfo=$(which "$e") |
|
|
|
einfo=$(type -pf "$e") |
|
|
|
printf -v pad %40s |
|
|
|
e=$e$pad |
|
|
|
e=${e:0:15} |
|
|
|