Clean code

This commit is contained in:
MatMoul 2015-10-10 22:13:08 +02:00
parent fa0dfbf254
commit 35a802fab1

10
archfi
View file

@ -189,28 +189,18 @@ diskpartautodos(){
if (whiptail --backtitle "$apptitle" --title "$txtautoparts (dos)" --yesno "${txtautopartsconfirm//%1/$device}" --defaultno 0 0) then if (whiptail --backtitle "$apptitle" --title "$txtautoparts (dos)" --yesno "${txtautopartsconfirm//%1/$device}" --defaultno 0 0) then
clear clear
echo "$txtautopartclear" echo "$txtautopartclear"
#echo "parted $device mklabel msdos"
parted $device mklabel msdos parted $device mklabel msdos
#echo "sleep 1"
sleep 1 sleep 1
echo "${txtautopartcreate//%1/boot}" echo "${txtautopartcreate//%1/boot}"
#echo "echo -e \"n\np\n\n\n+512M\na\nw\" | fdisk $device"
echo -e "n\np\n\n\n+512M\na\nw" | fdisk $device echo -e "n\np\n\n\n+512M\na\nw" | fdisk $device
#echo "sleep 1"
sleep 1 sleep 1
echo "${txtautopartcreate//%1/swap}" echo "${txtautopartcreate//%1/swap}"
#echo "swapsize=$(cat /proc/meminfo | grep MemTotal | awk '{ print $2 }')"
swapsize=$(cat /proc/meminfo | grep MemTotal | awk '{ print $2 }') swapsize=$(cat /proc/meminfo | grep MemTotal | awk '{ print $2 }')
#echo "swapsize=$(($swapsize/1000))\"M\""
swapsize=$(($swapsize/1000))"M" swapsize=$(($swapsize/1000))"M"
#echo "echo -e \"n\np\n\n\n+$swapsize\nt\n\n82\nw\" | fdisk $device"
echo -e "n\np\n\n\n+$swapsize\nt\n\n82\nw" | fdisk $device echo -e "n\np\n\n\n+$swapsize\nt\n\n82\nw" | fdisk $device
#echo "sleep 1"
sleep 1 sleep 1
echo "${txtautopartcreate//%1/root}" echo "${txtautopartcreate//%1/root}"
#echo "echo -e \"n\np\n\n\n\nw\" | fdisk $device"
echo -e "n\np\n\n\n\nw" | fdisk $device echo -e "n\np\n\n\n\nw" | fdisk $device
#echo "sleep 1"
sleep 1 sleep 1
echo "" echo ""
pressanykey pressanykey