Browse Source

file update

update files for software building
pull/50/head
Gorgone 4 years ago
committed by GitHub
parent
commit
c8d2bb8490
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      support/functions/_misc
  2. 2
      support/functions/_plugin_update_toolchain
  3. 21
      support/functions/_profiles
  4. 2
      support/functions/_sys_check

6
support/functions/_misc

@ -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"

2
support/functions/_plugin_update_toolchain

@ -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

21
support/functions/_profiles

@ -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"
compiler_link="$($g -dumpmachine)-gcc"
[ -L "$compiler_link" ] || ln -sf "$g" "$compiler_link"
[ -L "$strip_link" ] || ln -sf "$stripvar" "$strip_link"
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

2
support/functions/_sys_check

@ -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}

Loading…
Cancel
Save