diff -Nru obi-installer-3.3.0ubuntu0/debian/bzr-builder.manifest obi-installer-3.4.0ubuntu0/debian/bzr-builder.manifest --- obi-installer-3.3.0ubuntu0/debian/bzr-builder.manifest 2018-01-21 16:37:26.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/debian/bzr-builder.manifest 2018-03-15 13:13:10.000000000 +0000 @@ -1,2 +1,2 @@ -# bzr-builder format 0.3 deb-version {debupstream}-298 -lp:one-button-installer revid:israeldahl@gmail.com-20180121143609-ph6josjkdq42ti8r +# bzr-builder format 0.3 deb-version {debupstream}-345 +lp:one-button-installer revid:israeldahl@gmail.com-20180315130316-7n5y5mith2y3vuej diff -Nru obi-installer-3.3.0ubuntu0/debian/changelog obi-installer-3.4.0ubuntu0/debian/changelog --- obi-installer-3.3.0ubuntu0/debian/changelog 2018-01-21 16:37:26.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/debian/changelog 2018-03-15 13:13:10.000000000 +0000 @@ -1,8 +1,33 @@ -obi-installer (3.3.0ubuntu0-298~ubuntu18.04.1) bionic; urgency=low +obi-installer (3.4.0ubuntu0-345~ubuntu18.04.1) bionic; urgency=low * Auto build. - -- Israel Dahl Sun, 21 Jan 2018 16:37:26 +0000 + -- Israel Dahl Thu, 15 Mar 2018 13:13:10 +0000 + +obi-installer (3.4.0ubuntu0) UNRELEASED; urgency=medium + * obi-functions + - made this from the old 'functions' file + - added common things and reworked to add loggin function with function anme + * everything + - refactored to use obi-functions and move code into the common file + + -- Israel Dahl Mon, 29 Jan 2018 23:36:12 -0600 + +obi-installer (3.4.0ubuntu0) UNRELEASED; urgency=medium + * zenity + - 2> /dev/null for every zenity + * TABS + - instead of hard to read spaces in lots of places + * GRUB + - just install grub first before the wonky sed burst + * $(<) + - because it is bash + * text-mode-menu + - added localization and modern bash-ness + * probably more + - cause I did a lot + + -- Israel Dahl Thu, 25 Jan 2018 23:35:12 -0600 obi-installer (3.3.0ubuntu0) UNRELEASED; urgency=medium * zenity config dialogs diff -Nru obi-installer-3.3.0ubuntu0/debian/install obi-installer-3.4.0ubuntu0/debian/install --- obi-installer-3.3.0ubuntu0/debian/install 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/debian/install 2018-03-15 13:13:10.000000000 +0000 @@ -5,3 +5,4 @@ img/48/*.png usr/share/OBI img/zmktbl.png usr/share/icons/hicolor/64x64/apps img/*.svg usr/share/icons/hicolor/scalable/apps +usr/share/locale/ usr/share/ diff -Nru obi-installer-3.3.0ubuntu0/debian/postinst obi-installer-3.4.0ubuntu0/debian/postinst --- obi-installer-3.3.0ubuntu0/debian/postinst 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/debian/postinst 2018-03-15 13:13:10.000000000 +0000 @@ -19,7 +19,7 @@ done ## symlink binaries to bin -link_list=(zmktbl mktbl user-config grub-installer clearOBI zmktbl-wrapper obi-readme) +link_list=(zmktbl mktbl user-config grub-installer clearOBI zmktbl-wrapper obi-readme text-mode-menu) bin_dir=/usr/bin/ directory=/usr/share/OBI/ for app_link in "${link_list[@]}" diff -Nru obi-installer-3.3.0ubuntu0/maketranslation obi-installer-3.4.0ubuntu0/maketranslation --- obi-installer-3.3.0ubuntu0/maketranslation 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/maketranslation 2018-03-15 13:13:10.000000000 +0000 @@ -7,6 +7,7 @@ defaultdomain="obi-installer" comments="#" pofile="obi-installer.pot" +echo "searching the OBI directory for our text domain: $defaultdomain" for i in OBI/** do if [[ -f "$i" ]] @@ -17,6 +18,21 @@ done [[ -z ${files[*]} ]] && files=(confirm-partition dltbl findtbl fix-device functions grub-installer hw-progress list_drives mkctrl mkhelp mkhome mkp mkp1 mkp2p1 mkpmac mkpmac2p1 mkpxpy mktbl obi partition-help select-device select-part1 select-part2 select-tarball setlevel starter user-config yaboot-installer zmktbl) && echo "Couldn't find binaries, so I am using an older list..." cd "$dir" +echo "making translations for the programs" xgettext --copyright-holder="$ME" -p "$outputdir" -L "$programminglanguage" --add-comments="$comments" --strict --default-domain="$defaultdomain" --output "${outputdir}/${pofile}" "${files[@]}" -#sed -i 's/CHARSET/UTF-8/' "${outputdir}/${pofile}" -cd - +cd "${basedir}" +echo "Generating the locales" +for locale in "$outputdir/"**.po +do + if [[ -f "$locale" ]] + then + echo $locale + DIR="${locale/*\/}" + DIR="${DIR/.po}" + DIR="$basedir/usr/share/locale/$DIR/LC_MESSAGES/" + [[ -d "$DIR" ]] || mkdir -p "$DIR" + msgfmt -o "$defaultdomain.mo" "$locale" + mv "$defaultdomain.mo" "$DIR" + fi +done +echo "Done" diff -Nru obi-installer-3.3.0ubuntu0/OBI/autoselect obi-installer-3.4.0ubuntu0/OBI/autoselect --- obi-installer-3.3.0ubuntu0/OBI/autoselect 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/autoselect 2018-03-15 13:13:10.000000000 +0000 @@ -1,6 +1,23 @@ #!/bin/bash # this function automatically selects the correct pre-named partitions -tailfile="${HOME}"/.obi-progress + +################################################ +## Source our handy functions!! +## make sure they are in the PATH first +OBI_SHARE_DIR="/usr/share/OBI" +if [[ -d "${OBI_SHARE_DIR}" ]] && [[ "${PATH/$OBI_SHARE_DIR}" == "${PATH}" ]] +then + PATH="${PATH}:/usr/share/OBI" + export PATH +elif [[ "${PATH/$PWD}" == "${PATH}" ]] +then + PATH="${PATH}:${PWD}" + export PATH +fi +source obi-functions || exit +################################################ +partitions="$(getPartitions)" +tailfile="${HOME}/.obi-progress" [[ -z "${LANG}" ]] && LANG=C [[ -z "${LC_ALL}" ]] && LC_ALL=C LANGUAGE=$LC_ALL:$LANG:en_US diff -Nru obi-installer-3.3.0ubuntu0/OBI/clean-myself.bash obi-installer-3.4.0ubuntu0/OBI/clean-myself.bash --- obi-installer-3.3.0ubuntu0/OBI/clean-myself.bash 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/clean-myself.bash 2018-03-15 13:13:10.000000000 +0000 @@ -6,19 +6,22 @@ cd echo 'Press Enter to continue' read ans -ans= +unset ans echo '1. Use an editor to reduce the size of .bash_history' -if [ -z "$USER" ] +if [[ -z "$USER" ]] then USER="$(whoami)" fi - -nano /home/"$USER"/.bash_history - +if [[ "$USER" != "root" ]] +then + nano /home/"$USER"/.bash_history +else + nano /root/.bash_history +fi echo '2. Truncate the log files' -sudo bash truncate-log +sudo bash -c 'truncate-log' echo '3. Remove any temporary or extra files, for example tarballs if the blank' echo 'installer in going to be imaged.' @@ -27,7 +30,10 @@ sudo rm -i /home/"$USER"/{selected,obilevel,partitions,md5sums-phillw.txt} sudo rm -ir /home/"$USER"/.cache/* sudo rm -ir /home/"$USER"/.ssh/* -sudo apt-get clean +if [[ -n "$(which apt-get 2>/dev/null)" ]] +then + sudo apt-get clean +fi sudo rm -ir /tmp/* echo 'Check manually and remove files you do not want to keep' diff -Nru obi-installer-3.3.0ubuntu0/OBI/clearOBI obi-installer-3.4.0ubuntu0/OBI/clearOBI --- obi-installer-3.3.0ubuntu0/OBI/clearOBI 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/clearOBI 2018-03-15 13:13:10.000000000 +0000 @@ -1,74 +1,121 @@ #!/bin/bash +eval_gettext(){ + echo -e "$*" +} +source gettext.sh +unmountChroot=$(eval_gettext "Successfully unmounted chroot") +NOunmountChroot=$(eval_gettext "Couldn't successfully unmount chroot") + +################################################ +## Source our handy functions!! +## make sure they are in the PATH first +OBI_SHARE_DIR="/usr/share/OBI" +if [[ -d "${OBI_SHARE_DIR}" ]] && [[ "${PATH/$OBI_SHARE_DIR}" == "${PATH}" ]] +then + PATH="${PATH}:/usr/share/OBI" + export PATH +elif [[ "${PATH/$PWD}" == "${PATH}" ]] +then + PATH="${PATH}:${PWD}" + export PATH +fi +source obi-functions || exit +################################################ +ECHO() { + echoOut "clearOBI" "$*" +} +LOG_ECHO(){ + echoLOG "clearOBI" "$*" +} pid="$HOME"/.pid ## don't do anything if we can't :P -[[ ! -f "$pid" ]] && exit +[[ ! -f "$pid" ]] && exit 1 + +## exit values 1 == no pid file 2 == tried but failed +## 0 obviously means it worked + +[[ -z "$USEZENITY" ]] && USEZENITY="$(getZenity)" -[[ -f "$HOME/usezenity" ]] && USEZENITY=$(cat "$HOME/usezenity") -LOGecho(){ - if [ "$USEZENITY" == "true" ] - then - echo -e "[clearOBI]
$*
" >> "${HOME}"/obi-installer.log - else - echo -e "[clearOBI] $*" >> "${HOME}"/obi-installer.log - fi -} tailfile="${HOME}"/.obi-progress -[[ "$USEZENITY" == "true" ]] && LOGecho "restart progress" -[[ "$USEZENITY" != "true" ]] && LOGecho "restart progress" +[[ "$USEZENITY" == "true" ]] && LOG_ECHO "restart progress" +[[ "$USEZENITY" != "true" ]] && LOG_ECHO "restart progress" + + ## reset the progress indicator +echo "0 #OBI progress" > "$tailfile" echo "0 #OBI progress" > "$tailfile" - echo "0 #OBI progress" > "$tailfile" + + OIFS="$IFS" IFS=" " - pidlist=($(cat "$HOME/.pid")) - for i in "${pidlist[@]}" - do - kill -9 "$i" - LOGecho "kill -9 $i" - done - rm "$HOME/.pid" + +pidlist=($(cat "$HOME/.pid")) + +for i in "${pidlist[@]}" +do + kill -9 "$i" + LOG_ECHO "kill -9 $i" +done + +rm "$HOME/.pid" IFS="$OIFS" -source mkp -removeHTMLtags "${HOME}"/obi-installer.log -cp "${HOME}"/obi-installer.log "${HOME}"/obi-installer.log.old + +################################################ +## Source our handy functions!! + source mkp +################################################ + +removeHTMLtags "${HOME}/obi-installer.log" +cp "${HOME}"/obi-installer.log "${HOME}/obi-installer.log.old" [[ -f "${HOME}/usezenity" ]] && rm "${HOME}/usezenity" [[ -f "${HOME}/OSname" ]] && rm "${HOME}/OSname" [[ -f "${HOME}/distro.cpu" ]] && rm "${HOME}/distro.cpu" [[ -z "$CHROOT" ]] && CHROOT="/mnt" mount | grep "${CHROOT}" +## if the chroot isn't mounted then lets leave if (( $? != 0 )) then - exit + exit 0 fi -umount --force "${CHROOT}" +forceUmount "${CHROOT}" retval=$? + ## CHECK FOR ERRORS if (( retval == 0 )) then - LOGecho " [grub-installer] $unmountChroot" + LOG_ECHO "$unmountChroot" else - ## TRY TO FIX ISSUES - fUSER=($(fuser "$CHROOT")) - LSOF=$(lsof +d "$CHROOT") - [[ -n "${fUSER[*]}" ]] && MSG="fuser info:\n${fUSER[*]}\n" - [[ -n "$LSOF" ]] && MSG="${MSG}lsof info:$LSOF\n" - [[ "$USEZENITY" == "true" ]] && [[ -n "$MSG" ]] && MSG="${MSG//\\n/
}" - LOGecho " [grub-installer] ${MSG}$NOunmountChroot" - for i in "${fUSER[@]}" - do - chroot "$CHROOT" bash -c "kill -9 $i" && LOGecho "kill -9 $i" - done - umount --force "${CHROOT}" - retval=$? - if (( retval == 0 )) - then - LOGecho "$unmountChroot" - else - [[ -n "${fUSER[*]}" ]] && MSG="fuser info:\n${fUSER[*]}\n" - [[ -n "$LSOF" ]] && MSG="${MSG}lsof info:$LSOF\n" - [[ "$USEZENITY" == "true" ]] && [[ -n "$MSG" ]] && MSG="${MSG//\\n/
}" - LOGecho " [grub-installer] ${MSG}$NOunmountChroot" - fi + +## TRY TO FIX ISSUES + fUSER=($(fuser "$CHROOT")) + LSOF=$(lsof +d "$CHROOT") + [[ -n "${fUSER[*]}" ]] && MSG="fuser info:\n${fUSER[*]}\n" + [[ -n "$LSOF" ]] && MSG="${MSG}lsof info:$LSOF\n" + [[ "$USEZENITY" == "true" ]] && [[ -n "$MSG" ]] && MSG="${MSG//\\n/
}" + LOG_ECHO " [clearOBI] ${MSG}$NOunmountChroot" + +## try to kill things running + for i in "${fUSER[@]}" + do + chroot "$CHROOT" bash -c "kill -9 $i" && LOG_ECHO "kill -9 $i" + done + +## try to unmount chroot by force + umount --force "${CHROOT}" + retval=$? + if (( retval == 0 )) + then + LOG_ECHO "$unmountChroot" + else + +## log stuff cause this didn't work + [[ -n "${fUSER[*]}" ]] && MSG="fuser info:\n${fUSER[*]}\n" + [[ -n "$LSOF" ]] && MSG="${MSG}lsof info:$LSOF\n" + [[ "$USEZENITY" == "true" ]] && [[ -n "$MSG" ]] && MSG="${MSG//\\n/
}" + LOG_ECHO "${MSG}$NOunmountChroot" + exit 2 + fi fi +exit 0 diff -Nru obi-installer-3.3.0ubuntu0/OBI/confirm-partition obi-installer-3.4.0ubuntu0/OBI/confirm-partition --- obi-installer-3.3.0ubuntu0/OBI/confirm-partition 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/confirm-partition 2018-03-15 13:13:10.000000000 +0000 @@ -11,10 +11,12 @@ # 2013-12-05 sudodus select-partition created from select-device # #----------------------------------------------------------------------------- -. gettext.sh +eval_gettext(){ + echo -e "$*" +} +source gettext.sh export TEXTDOMAIN=obi-installer ########################################################### -ScriptnotfoundChangedirectory=$(eval_gettext "Script not found. Change directory!") OneButtonInstaller=$(eval_gettext "One Button Installer") ConfirmPartition=$(eval_gettext "Confirm partition") ##These two lines go together around a variable showing the OS name: @@ -93,67 +95,56 @@ Install=$(eval_gettext "Install") ## please leave obi-root AND obi-swap in English. Please separate the two lines with \n (the newline character) NOautoPartitionsFOUND=$(eval_gettext "No root partition found with obi-root as the label to select automatically.\nNo swap partition found with obi-swap as the label to select automatically.") +Youmustusethegraphicalenvironmenttousegparteddoyouwanttolaunchitnow=$(eval_gettext "Restart, and use the graphical environment to use gparted") +TheOneButtonInstallermustexittotheshellorstartagraphicalenvironmenttocontinue=$(eval_gettext "The One Button Installer must exit to the shell, or start a graphical environment to continue") ########################################################### -[[ -f "$HOME/usezenity" ]] && USEZENITY=$(cat "$HOME/usezenity") -ICONPATH="/usr/share/icons/hicolor/48x48/apps/obi-window-icon.png" -ZEN_ICON="--window-icon=$ICONPATH" -tailfile="${HOME}"/.obi-progress -partitions="/usr/share/OBI/partitions" -[[ -z "$obi_system" ]] && obi_system=$(cat "$HOME/OSname") -echoout() { - if [[ "$USEZENITY" == "true" ]] - then - zenity --class=OBI --info --timeout=7 --title="$OneButtonInstaller" "$ZEN_ICON" --text="$*" - echo -e "
[confirm-partition]
$*" >> "${HOME}"/obi-installer.log - else - dialog --infobox "$*" 0 0 - sleep .7 - echo -e "[confirm-partition] $*" >> "${HOME}"/obi-installer.log - fi -} -LOGecho(){ - if [[ "$USEZENITY" == "true" ]] - then - echo -e "
[confirm-partition]
$*" >> "${HOME}"/obi-installer.log - else - echo -e "[confirm-partition] $*" >> "${HOME}"/obi-installer.log - fi + +################################################ +## Source our handy functions!! +## make sure they are in the PATH first +OBI_SHARE_DIR="/usr/share/OBI" +if [[ -d "${OBI_SHARE_DIR}" ]] && [[ "${PATH/$OBI_SHARE_DIR}" == "${PATH}" ]] +then + PATH="${PATH}:/usr/share/OBI" + export PATH +elif [[ "${PATH/$PWD}" == "${PATH}" ]] +then + PATH="${PATH}:${PWD}" + export PATH +fi +source obi-functions || exit +################################################ + +## global variables +[[ -z "$USEZENITY" ]] && USEZENITY="$(getZenity)" +ICONPATH="$(getIcon)" +ZEN_ICON="--window-icon=$ICONPATH" +tailfile="${HOME}/.obi-progress" +[[ -z "$dpath" ]] && dpath="$(getDpath)" +tiptxt="${dpath}/tips.txt" +ECHO() { + echoOut "confirm-partition" "$*" } -getSelectedTarball(){ - if [ -f /usr/share/OBI/selected ] - then - selected="/usr/share/OBI/selected" - elif [ -f "$HOME/selected" ] - then - selected="$HOME/selected" - elif [ -f "$PWD/selected" ] - then - selected="$PWD/selected" - else - selected="" - LOGecho "[ERROR] searching for selected" - fi - [[ -n "$selected" ]] && tarball=$(cat "$selected") - echo "$tarball" +LOG_ECHO(){ + echoLOG "confirm-partition" "$*" } -clearOBI(){ - LOGecho "[confirm-partition] restart progress" - echo "0 #OBI progress" > "$tailfile" -OIFS="$IFS" -IFS=" -" - pidlist=($(cat "$HOME/.pid")) - for i in "${pidlist[@]}" - do - kill -9 "$i" - LOGecho "kill -9 $i" - done - rm "$HOME/.pid" -IFS="$OIFS" +tipText(){ + if [[ ! -f "$tiptxt" ]] + then + LOG_ECHO "$tiptxt ($TipshowtopreparepartitionswithGparted) does not exist... this will not work properly" + return 1 + fi + if [[ "$USEZENITY" == "true" ]] + then + zenity --class=OBI --text-info --title="$OneButtonInstaller - $Tipsusearrowkeystoscroll" --filename="$tiptxt" 2>/dev/null + else + dialog --backtitle "$OneButtonInstaller - $Tipsusearrowkeystoscroll" --textbox "$tiptxt" 17 76 + fi + return 0 } -prgnam="$OneButtonInstaller" -[[ -z "$tarball" ]] && tarball=$(getSelectedTarball) +[[ -z "$tarball" ]] && tarball="$(getTarballFile)" +[[ -z "$obi_system" ]] && obi_system="$(getOBISystem)" WARN_COLOR="#cc0000" # main program # variables @@ -163,96 +154,80 @@ bs=4096 export bs count=256 -cnt= -target= ## what is this for? +unset cnt +unset target ## what is this for? source="$1" export source LC_ALL=C LANG=C -tmpstr= ## what is this for?? -tiptxt="tips.txt" -prgnam="$OneButtonInstaller" +unset tmpstr ## what is this for?? + ## Ubuntu/Debian ONLY version number -APTCACHE=$(which apt-cache) -if [[ -n "${APTCACHE}" ]] -then - ver_no=$(apt-cache policy obi-installer | grep 'Installed:') - ver_no="${ver_no/*Installed:}" - ver_no="${ver_no/ubuntu*}" - ver_no="${ver_no/~*}" - ver_no="${ver_no// }" - LOGecho "$ver_no" - version="$prgnam $ver_no" -fi -if [[ -z "${version}" ]] -then -## if we can't find apt-cache to grep the version just display the program name - version="$prgnam" -fi +[[ -z "${version}" ]] && version="$(getVersion)" ## find the directory path (dpath) -if [[ -f "/home/$USER/autoselect" ]] -then - dpath="/home/$USER" -elif [[ -f "${HOME}/autoselect" ]] -then - dpath="${HOME}" -elif [[ -f "${PWD}/autoselect" ]] -then - dpath="${PWD}" -elif [[ -f /usr/share/OBI/autoselect ]] -then - dpath="/usr/share/OBI/" -else - echoout "$ScriptnotfoundChangedirectory" - clearOBI - exit 1 -fi +partitions="$dpath/partitions" +read_partitions(){ +# zero these variables so that they get read correctly each time (in case we unset swap after initially choosing a swap + unset swappart + unset rootpart + unset homepart +## read the variables from the partitions file + while read LINE || [[ "$LINE" ]] + do + case $LINE in + obi-root:*)rootpart="${LINE/*:}";; + obi-swap:*)swappart="${LINE/*:}";; + obi-home:*)homepart="${LINE/*:}";; + *);; + esac + done < "$partitions" +} # usage only if the user is not root if [[ "$(whoami)" != "root" ]] then - clearOBI - if [[ "$USEZENITY" == "true" ]] - then - echoout "$Usage:\n\n$Install $obi_system\n$aninternalharddiskdriveorexternalUSBoreSATAdrive\n---- $Install $obi_system --------\nsudo $0" - - else - echo "$Usage:" - echo "$Install $obi_system" - echo "$aninternalharddiskdriveorexternalUSBoreSATAdrive" - echo "---- $Install $obi_system --------" - echo "sudo $0" - fi - exit + clearOBI + if [[ "$USEZENITY" == "true" ]] + then + ECHO "$Usage:\n\n$Install $obi_system\n$aninternalharddiskdriveorexternalUSBoreSATAdrive\n---- $Install $obi_system --------\nsudo $0" + else + echo "$Usage:" + echo "$Install $obi_system" + echo "$aninternalharddiskdriveorexternalUSBoreSATAdrive" + echo "---- $Install $obi_system --------" + echo "sudo $0" + fi + exit fi + # select action based on preselected items if [[ "$USEZENITY" == "true" ]] then - if [[ -z "$rootpart" ]] - then - echo > "$partitions" - MSG="$Doyouwanttoinstall\n$obi_system" - else - MSG="$Doyouwanttoinstall\n$obi_system\n$LOCatioN $rootpart $swappart" - fi - zenity --class=OBI --question --title="$OneButtonInstaller $version - $ConfirmPartition" --text="$MSG" - retval=$? - if (( retval != 0 )) - then - clearOBI - exit - fi + if [[ -z "$rootpart" ]] + then + echo > "$partitions" + MSG="$Doyouwanttoinstall\n$obi_system" + else + MSG="$Doyouwanttoinstall\n$obi_system\n$LOCatioN $rootpart $swappart" + fi + zenity --class=OBI --question --title="$OneButtonInstaller $version - $ConfirmPartition" --text="$MSG" 2>/dev/null + retval=$? + if (( retval != 0 )) + then + "${dpath}/"clearOBI + exit + fi else - ans=$(dialog --backtitle "$OneButtonInstaller $version - $ConfirmPartition" \ + ans=$(dialog --backtitle "$OneButtonInstaller $version - $ConfirmPartition" \ --yesno "$Doyouwanttoinstall $obi_system" 0 0 \ 3>&1 1>&2 2>&3 3>&- ) - retval=$? - if (( retval != 0 )) - then - clearOBI - read -p "$PressEntertoquitreturntothemainmenu" - exit - fi + retval=$? + if (( retval != 0 )) + then + clearOBI + read -p "$PressEntertoquitreturntothemainmenu" + exit + fi fi ## automatically select partitions based on the partition labels "$dpath"/autoselect @@ -261,148 +236,140 @@ ## the main loop while [[ "$ans" != "$ans_goahead" ]] do - ## This is for the dialog version only.. It is the list height - chocnt=7 + +## This is for the dialog version only.. It is the list height + chocnt=7 + # the default choice it 'Go ahead' to install - choice="$ans_goahead" -# zero these variables so that they get read correctly each time (in case we unset swap after initially choosing a swap - unset swappart - unset rootpart - unset homepart -## read the variables from the partitions file - while read LINE || [[ "$LINE" ]] - do - case $LINE in - obi-root:*)rootpart="${LINE/*:}";; - obi-swap:*)swappart="${LINE/*:}";; - obi-home:*)homepart="${LINE/*:}";; - *);; - esac - done < "$partitions" + choice="$ans_goahead" +## read the partitions + read_partitions ## if there is a root partition in the file find the bklkid - if [[ -n "$homepart" ]] - then - HOMEtext="$ChangeHomePartition" - else - HOMEtext="$CreateHomePartition" - fi - if [[ -z "$rootpart" ]] - then + if [[ -n "$homepart" ]] + then + HOMEtext="$ChangeHomePartition" + else + HOMEtext="$CreateHomePartition" + fi + if [[ -z "$rootpart" ]] + then ## get the /dev/sdXY from blkid - rootpart=$(blkid -c /dev/null|grep -i obi|grep -im1 root|cut -d: -f1) - homepart=$(blkid -c /dev/null|grep -i obi|grep -im1 home|cut -d: -f1) - swappart=$(blkid -c /dev/null|grep -i obi|grep -im1 swap|cut -d: -f1) - echo "obi-root:$rootpart + rootpart=$(blkid -c /dev/null|grep -i obi|grep -im1 root|cut -d: -f1) + homepart=$(blkid -c /dev/null|grep -i obi|grep -im1 home|cut -d: -f1) + swappart=$(blkid -c /dev/null|grep -i obi|grep -im1 swap|cut -d: -f1) + echo "obi-root:$rootpart obi-swap:$swappart" > "$partitions" - [[ -n "$homepart" ]] && echo "obi-home:$homepart" >> "$partitions" - fi - # is the root partition a block device? - if [[ -b "$rootpart" ]] - then + [[ -n "$homepart" ]] && echo "obi-home:$homepart" >> "$partitions" + fi + +# is the root partition a block device? + if [[ -b "$rootpart" ]] + then ## make retval 0 in case we do not need to unmount root partition - retval=0 - CHECK_ROOT=$(mount |grep "$rootpart") - # is it mounted? - if [[ -n "$CHECK_ROOT" ]] - then - LOGecho "$rootpart $ismounted: + retval=0 + CHECK_ROOT=$(mount |grep "$rootpart") +# is it mounted? + if [[ -n "$CHECK_ROOT" ]] + then + LOG_ECHO "$rootpart $ismounted: $CHECK_ROOT" ## unmount the root partition just in case - umount --force "$rootpart" && echoout "$rootpart $hasbeenunmounted" - retval="$?" - else - LOGecho "$rootpart $wasnotmounted" - fi - # did it unmount? - if (( retval != 0 )) - then - echoout "$rootpart $shouldNOTbemounted" - fi - fi + umount --force "$rootpart" && ECHO "$rootpart $hasbeenunmounted" + retval="$?" + else + LOG_ECHO "$rootpart $wasnotmounted" + fi +# did it unmount? + if (( retval != 0 )) + then + ECHO "$rootpart $shouldNOTbemounted" + fi + fi ## is the swap partition a block device? - if [[ -b "$swappart" ]] - then + if [[ -b "$swappart" ]] + then ## make retval 0 in case we do not need to unmount swap partition - retval=0 - CHECK_SWAP=$(mount |grep "$swappart") - if [[ -n "$CHECK_SWAP" ]] - then - LOGecho "$swappart $ismounted: + retval=0 + CHECK_SWAP=$(mount |grep "$swappart") + if [[ -n "$CHECK_SWAP" ]] + then + LOG_ECHO "$swappart $ismounted: $CHECK_SWAP" ## unmount the swap partition just in case - umount --force "$swappart" && echoout "$swappart $hasbeenunmounted" - retval="$?" - else - LOGecho "$swappart $wasnotmounted" - fi - if (( retval != 0 )) - then - echoout "$swappart $shouldNOTbemounted" - fi - fi + umount --force "$swappart" && ECHO "$swappart $hasbeenunmounted" + retval="$?" + else + LOG_ECHO "$swappart $wasnotmounted" + fi + if (( retval != 0 )) + then + ECHO "$swappart $shouldNOTbemounted" + fi + fi ## tarball DOES NOT have noswap in the name - if [[ "${tarball/noswap}" == "$tarball" ]] - then - if [[ -n "$swappart" ]] - then - swapshow="$swappart" - else - choice="$ans_swappart" - swapshow="\Z1\Zb$NOSWAP\Zn" - [[ "$USEZENITY" == "true" ]] && swapshow="$NOSWAP" - fi - swaptxt1="$andtheswappartition: \Z1$swapshow\Zn\n\n" - [[ "$USEZENITY" == "true" ]] && swaptxt1="$andtheswappartition: $swapshow

" - swapcmd2="$ans_swappart" - swaptxt2="$Swappartitionselectorchange" - else + if [[ "${tarball/noswap}" == "$tarball" ]] + then + if [[ -n "$swappart" ]] + then + swapshow="$swappart" + else + choice="$ans_swappart" + swapshow="\Z1\Zb$NOSWAP\Zn" + [[ "$USEZENITY" == "true" ]] && swapshow="$NOSWAP" + fi + swaptxt1="$andtheswappartition: \Z1$swapshow\Zn\n\n" + [[ "$USEZENITY" == "true" ]] && swaptxt1="$andtheswappartition: $swapshow

" + swapcmd2="$ans_swappart" + swaptxt2="$Swappartitionselectorchange" + else # tarball does have 'noswap' in the name (the unusual case) - ## This is for the dialog version only.. It is the list height - chocnt=$((chocnt-1)) +## This is for the dialog version only.. It is the list height + chocnt=$((chocnt-1)) ## clear variables and set menu items to 'quit' - swaptxt1="" - swapcmd2="$ans_quit" - swaptxt2=" $Quitfromthismenureturntothestartermenu" - swappart="" + swaptxt1="" + swapcmd2="$ans_quit" + swaptxt2=" $Quitfromthismenureturntothestartermenu" + swappart="" # write the root partition to the partition file and overwrite anything else in it. - [[ -n "$rootpart" ]] && echo "obi-root:$rootpart" > "$partitions" - fi + [[ -n "$rootpart" ]] && echo "obi-root:$rootpart" > "$partitions" + fi # if we already have a root partition - if [[ -n "$rootpart" ]] - then + if [[ -n "$rootpart" ]] + then ## change the text in the informative dialog to the partition - rootshow="$rootpart" + rootshow="$rootpart" ## if we are using zenity make it red - [[ "$USEZENITY" == "true" ]] && rootshow="$rootpart

" + [[ "$USEZENITY" == "true" ]] && rootshow="$rootpart

" ## change the first menu item to 'Go Ahead' - gocmd="$ans_goahead" - gotxt=" $Goaheadconfirmthechoice" - else + gocmd="$ans_goahead" + gotxt=" $Goaheadconfirmthechoice" + else ## otherwise make the default choice choosing the root partition - choice="$ans_rootpart" + choice="$ans_rootpart" ## make the informative dialog show NO ROOT - rootshow="\Z1\Zb$NOROOT\Zn" - [[ "$USEZENITY" == "true" ]] && rootshow="$NOROOT" + rootshow="\Z1\Zb$NOROOT\Zn" + [[ "$USEZENITY" == "true" ]] && rootshow="$NOROOT" ## make the first menu item selecting the root partition - gocmd="$ans_rootpart" - gotxt="$StartselectingaRootpartition" - fi + gocmd="$ans_rootpart" + gotxt="$StartselectingaRootpartition" + fi + - echo "30 #OBI progress">> "$tailfile" +echo "30 #OBI progress">> "$tailfile" #### THE INFORMATIVE DIALOG - if [[ "$USEZENITY" == "true" ]] - then - MSG="$TheOneButtonInstallerispreparedtostartinstalling
$theoperatingsystem: $obi_system
+ if [[ "$USEZENITY" == "true" ]] + then + MSG="$TheOneButtonInstallerispreparedtostartinstalling
$theoperatingsystem: $obi_system
$totherootpartition: $rootshow
$swaptxt1" - echo "$MSG" | zenity --class=OBI --title="$OneButtonInstaller $version - $ConfirmPartition" --width=535 --height=300 --text-info "${ZEN_ICON}" --html --filename="/dev/stdin" + echo "$MSG" | zenity --class=OBI --title="$OneButtonInstaller $version - $ConfirmPartition" --width=535 --height=300 --text-info "${ZEN_ICON}" --html --filename="/dev/stdin" 2>/dev/null ## ZENITY VERSION has a separate list from the informative dialog - ans=$(zenity --class=OBI --list \ + ans=$(zenity --class=OBI --list \ "${ZEN_ICON}" --width=550 --height=280 \ --title="$OneButtonInstaller $version - $ConfirmPartition" \ --text="$Changeorconfirmthepartitionsorquit" \ @@ -415,23 +382,30 @@ "$swapcmd2" "$swaptxt2" \ "$ans_tipshow" " $TipshowtopreparepartitionswithGparted" \ "$ans_home" "$HOMEtext" \ -"$ans_quit" " $Quitfromthismenureturntothestartermenu") -ans="${ans:0:1}" +"$ans_quit" " $Quitfromthismenureturntothestartermenu" 2>/dev/null) + ans="${ans:0:1}" #"$ans_home" "$HOMEtext" \ ## DIALOG version has the informative dialog and list in one - else - ans=$(dialog --cr-wrap --no-collapse --no-shadow --default-item "$choice" \ ---backtitle "$OneButtonInstaller $version - $ConfirmPartition" \ ---title "$Pleaseselectanactionwithaletterkeyorthearrowkeys" \ ---colors --cancel-label "$QUIT" --menu \ -"$TheOneButtonInstallerispreparedtostartinstalling\n + else + if [[ "$TERM" == "linux" ]] && [[ -z "$DISPLAY" ]] + then + thisTITLE="$TheOneButtonInstallermustexittotheshellorstartagraphicalenvironmenttocontinue" + GPTED=" $Youmustusethegraphicalenvironmenttousegparteddoyouwanttolaunchitnow" + else + GPTED=" $usegpartedandshowhelp" + thisTITLE="$TheOneButtonInstallerispreparedtostartinstalling\n $theoperatingsystem: \Z4$obi_system\Zn\n $totherootpartition: \Z1$rootshow\Zn\n $swaptxt1 -$Changeorconfirmthepartitionsorquit" 19 76 "$chocnt" \ +$Changeorconfirmthepartitionsorquit" + fi + ans=$(dialog --cr-wrap --no-collapse --no-shadow --default-item "$choice" \ +--backtitle "$OneButtonInstaller $version - $ConfirmPartition" \ +--title "$Pleaseselectanactionwithaletterkeyorthearrowkeys" \ +--colors --cancel-label "$QUIT" --menu "$thisTITLE" 19 76 "$chocnt" \ "$gocmd" "$gotxt" \ -"$ans_gparted" " $usegpartedandshowhelp" \ +"$ans_gparted" "$GPTED" \ "$ans_overview" " $Overview" \ "$ans_autoselect" " $Autoselectselectrootandswappartitionsautomatically" \ "$ans_rootpart" " $Rootpartitionselectorchange" \ @@ -440,62 +414,47 @@ "$ans_home" "$HOMEtext" \ "$ans_quit" " $Quitfromthismenureturntothestartermenu" \ 3>&1 1>&2 2>&3 3>&- ) - - fi + fi ## check the user's selection - - if [[ "$ans" == "$ans_goahead" ]] - then - LOGecho "$ans_goahead" - elif [[ "$ans" == "$ans_gparted" ]] - then - "$dpath/partition-help" - elif [[ "$ans" == "$ans_overview" ]] - then - "$dpath/select-part1" - elif [[ "$ans" == "$ans_autoselect" ]] - then - "$dpath/autoselect" - unset swappart - unset rootpart - ## read the variables from the partitions file - while read LINE || [[ "$LINE" ]] - do - case $LINE in - obi-root:*)rootpart="${LINE/*:}";; - obi-swap:*)swappart="${LINE/*:}";; - *);; - esac - done < "$partitions" - if [[ -z "$rootpart" ]] && [[ -z "$swappart" ]] - then - echoout "$NOautoPartitionsFOUND" - fi - elif [[ "$ans" == "$ans_rootpart" ]] - then - "$dpath/select-part2" root - elif [[ "$ans" == "$ans_swappart" ]] - then - "$dpath/select-part2" swap - elif [[ "$ans" == "$ans_tipshow" ]] - then - [[ ! -f "$tiptxt" ]] && LOGecho "$tiptxt ($TipshowtopreparepartitionswithGparted) does not exist... this will not work properly" - if [[ "$USEZENITY" == "true" ]] - then - zenity --class=OBI --text-info --title="$OneButtonInstaller - $Tipsusearrowkeystoscroll" --filename="$tiptxt" - else - dialog --backtitle "$OneButtonInstaller - $Tipsusearrowkeystoscroll" --textbox "$tiptxt" 17 76 - fi - elif [[ "$ans" == "$ans_quit" ]] - then - clearOBI - exit - else - clearOBI - exit - fi - + case $ans in + "$ans_goahead") + if [[ "$TERM" == "linux" ]] && [[ -z "$DISPLAY" ]] + then + clearOBI + sudo startx 2>/dev/null + else + LOG_ECHO "$ans_goahead" + fi + ;; + "$ans_gparted") + if [[ "$TERM" == "linux" ]] && [[ -z "$DISPLAY" ]] + then + clearOBI + sudo startx 2>/dev/null + else + "$dpath/partition-help" + fi + ;; + "$ans_overview")"$dpath/select-part1";; + "$ans_autoselect") + "$dpath/autoselect" +## re-read the partitions + read_partitions + + if [[ -z "$rootpart" ]] && [[ -z "$swappart" ]] + then + ECHO "$NOautoPartitionsFOUND" + fi + ;; + "$ans_rootpart")"$dpath/select-part2" root;; + "$ans_swappart")"$dpath/select-part2" swap;; + "$ans_tipshow")tipText;; + *) + clearOBI + exit + ;; + esac done ## end of menu loop # here we go @@ -508,31 +467,9 @@ if [[ "$USEZENITY" == "true" ]] then # from mkusb... it is an arrow that points to the checkbox to click - arrow=' - - - - - - - - - -' + arrow="$(ArrowSVG)" ## arrow is in obi-functions - MSG=" + MSG="


@@ -547,18 +484,19 @@ $arrow " + ## get dialog formatting out and change things to html format for zenity - MSG="${MSG//\\Z4/}" - MSG="${MSG//\\Zn/}" - MSG="${MSG//\\Z7/}" - MSG="${MSG//\\Z1/}" - MSG="${MSG//\\n/
}" - echo "$MSG" | zenity --class=OBI --title="$OneButtonInstaller $version - $ConfirmPartition - $finalWARNING" --width=535 --height=380 --text-info --html --checkbox="$Checkthisboxifyouarereadytogo" "${ZEN_ICON}" --filename="/dev/stdin" - retval=$? + MSG="${MSG//\\Z4/}" + MSG="${MSG//\\Zn/}" + MSG="${MSG//\\Z7/}" + MSG="${MSG//\\Z1/}" + MSG="${MSG//\\n/
}" + echo "$MSG" | zenity --class=OBI --title="$OneButtonInstaller $version - $ConfirmPartition - $finalWARNING" --width=535 --height=380 --text-info --html --checkbox="$Checkthisboxifyouarereadytogo" "${ZEN_ICON}" --filename="/dev/stdin" 2>/dev/null + retval=$? else - warning_dialog - ans=$(dialog --cr-wrap --no-collapse --defaultno --colors \ + warning_dialog + ans=$(dialog --cr-wrap --no-collapse --defaultno --colors \ --backtitle "$OneButtonInstaller $version - $ConfirmPartition - $finalWARNING" \ --yesno "$TheOneButtonInstallerispreparedtostartinstalling\n\n $theoperatingsystem \Z4$obi_system\Zn\n @@ -567,16 +505,16 @@ $ThisistheFINALWARNINGbeforestartingtoinstall\n $Doyoureallywanttoinstallandoverwritethesepartitions" 13 76 \ 3>&1 1>&2 2>&3 3>&- ) - retval=$? - normal_dialog + retval=$? + normal_dialog fi ## if the user selects to cancel lets restart everything if (( retval != 0 )) then - clearOBI - exit + clearOBI + exit fi cnt="count=$count" ## what is this for?? @@ -584,25 +522,25 @@ # installing the system if [[ -n "$swappart" ]] then - LOGecho "$Installing $obi_system $rootpart\n$withswap $swappart" + LOG_ECHO "$Installing $obi_system $rootpart\n$withswap $swappart" else - LOGecho "$Installing $obi_system $rootpart\n$withnoswappartition" + LOG_ECHO "$Installing $obi_system $rootpart\n$withnoswappartition" fi echo " " -LOGecho "[confirm-partition]mklub $obi_system $tarball $rootpart $swappart" +LOG_ECHO "mklub $obi_system $tarball $rootpart $swappart" ## not sure what this is for? read -sn1 -t3 ## mklub is sourced by the obi script ## mkpxpy is the source for this, but it sources mkp which holds common functions to all no swap [mkp1], swap and root (the default)[mkp2p1] and the choose your own [mkpxpy] -mklub "$obi_system" "$tarball" "$rootpart" "$swappart" +mklub "$CHROOT" "$obi_system" "$tarball" "$rootpart" "$swappart" ## the entire installation has finished (see mkpxpy and mkp for the actual installation code) if [[ "$USEZENITY" == "true" ]] then - LOGecho "$ChecktheResult" + LOG_ECHO "$ChecktheResult" else - read -p "$ChecktheresultandpressEntertocontinue" + read -p "$ChecktheresultandpressEntertocontinue" fi diff -Nru obi-installer-3.3.0ubuntu0/OBI/dltbl obi-installer-3.4.0ubuntu0/OBI/dltbl --- obi-installer-3.3.0ubuntu0/OBI/dltbl 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/dltbl 2018-03-15 13:13:10.000000000 +0000 @@ -12,7 +12,6 @@ PressENTERtocontinue=$(eval_gettext "Press ENTER to continue") Usage=$(eval_gettext "Usage") todownloadtarballs=$(eval_gettext "to download tarballs") -Errorfindingthetarballpathsoitwasmadeat=$(eval_gettext "Error finding the tarball path so it was made at") ## this is a popup to show that there was an error dowloading a file errordownloading=$(eval_gettext "Error downloading:") Thereshouldbeenoughspaceforthenewtarball=$(eval_gettext "There should be enough space for the new tarball") @@ -35,178 +34,162 @@ ReadyToContinue=$(eval_gettext "Ready To Continue") ChecktheResult=$(eval_gettext "Check the Result") HOTKEY=$(eval_gettext "Hotkey") +Remove=$(eval_gettext "Remove") ########################################################### -# selecting repository for tarballs -[[ -f "$HOME/usezenity" ]] && USEZENITY=$(cat "$HOME/usezenity") -ICONPATH="/usr/share/icons/hicolor/48x48/apps/obi-window-icon.png" -ZEN_ICON="--window-icon=$ICONPATH" -echoout() { - if [[ "$USEZENITY" == "true" ]] - then - echo -e "
[dltbl]
$*" >> "${HOME}"/obi-installer.log - zenity --class=OBI --info --timeout=7 --title="$OneButtonInstaller" "$ZEN_ICON" --text="$*" - else - echo -e "[dltbl] $*" >> "${HOME}"/obi-installer.log - dialog --infobox "$*" 0 0 - sleep .7 - fi + +################################################ +## Source our handy functions!! +## make sure they are in the PATH first +OBI_SHARE_DIR="/usr/share/OBI" +if [[ -d "${OBI_SHARE_DIR}" ]] && [[ "${PATH/$OBI_SHARE_DIR}" == "${PATH}" ]] +then + PATH="${PATH}:/usr/share/OBI" + export PATH +elif [[ "${PATH/$PWD}" == "${PATH}" ]] +then + PATH="${PATH}:${PWD}" + export PATH +fi +source obi-functions || exit +################################################ +ECHO() { + echoOut "dltbl" "$*" } -LOGecho(){ - if [[ "$USEZENITY" == "true" ]] - then - echo -e "
[dltbl]
$*" >> "${HOME}"/obi-installer.log - else - echo -e "[dltbl] $*" >> "${HOME}"/obi-installer.log - fi +LOG_ECHO(){ + echoLOG "dltbl" "$*" } +if [[ "$(whoami)" != "root" ]] +then + ECHO "$Usage: sudo $0\n$todownloadtarballs" + exit +fi + +# selecting repository for tarballs +## global variables +[[ -z "$USEZENITY" ]] && USEZENITY="$(getZenity)" +ICONPATH="$(getIcon)" +ZEN_ICON="--window-icon=$ICONPATH" + [[ -z "$prgnam" ]] && prgnam="$OneButtonInstaller" + #release="$(grep RELEASE /etc/lsb-release|cut -d= -f2)" release="$(grep VERSION_ID /etc/os-release|cut -d= -f2)" idvar="$(grep '^ID=' /etc/os-release|cut -d= -f2)" md5file="md5sums-phillw.txt" + #release=14.04 # uncomment to force for testing teststr=${release/.} teststr=${teststr//\"} -LOGecho "Version=$teststr" +LOG_ECHO "Version=$teststr" test4str=${teststr:0:4} if (( test4str == 1204 )) && [[ "$idvar" == "ubuntu" ]] then - md5src="http://phillw.net/isos/linux-tools/OBI/precise/$md5file" - tblsrc="http://phillw.net/isos/linux-tools/OBI/precise/tarballs/" + md5src="http://phillw.net/isos/linux-tools/OBI/precise/$md5file" + tblsrc="http://phillw.net/isos/linux-tools/OBI/precise/tarballs/" elif (( test4str > 1210 )) && [[ "$idvar" == "ubuntu" ]] then - md5src="http://phillw.net/isos/linux-tools/OBI/trusty/$md5file" - tblsrc="http://phillw.net/isos/linux-tools/OBI/trusty/tarballs/" + md5src="http://phillw.net/isos/linux-tools/OBI/trusty/$md5file" + tblsrc="http://phillw.net/isos/linux-tools/OBI/trusty/tarballs/" elif (( test4str == 8 )) && [[ "$idvar" == "debian" ]] then - # holder for Debian based tarballs - echoout "$dltblcannotdownloadtarballsfor: $idvar $release" - exit +# holder for Debian based tarballs + ECHO "$dltblcannotdownloadtarballsfor: $idvar $release" + exit else - echoout "$dltblcannotdownloadtarballsfor: $idvar $release" - echo "------------------------------------------------------------" - cat /etc/*release|sort - echoout "--------------------------------------\n$Cannotfindrepositoryautomaticallyforthisdistroversion\n$Downloadchecktarballsmanuallyandmovethemtotarballs\n--------------------------------------" - #read -p "$PressENTERtocontinue" - exit + ECHO "$dltblcannotdownloadtarballsfor: $idvar $release" + echo "------------------------------------------------------------" + cat /etc/*release|sort + ECHO "--------------------------------------\n$Cannotfindrepositoryautomaticallyforthisdistroversion\n$Downloadchecktarballsmanuallyandmovethemtotarballs\n--------------------------------------" + exit fi md5temp=$(mktemp) ## Ubuntu ONLY version number -APTCACHE=$(which apt-cache) -if [[ -n "${APTCACHE}" ]] -then - ver_no=$(apt-cache policy one-button-installer | grep Installed: | sed 's/Installed://' | sed 's/ubuntu.*//') - version="$prgnam $ver_no" -fi -if [ -z "${version}" ] -then -## if we can't find apt-cache to grep the version just display the program name - version="$prgnam" -fi -if [[ "$(whoami)" != "root" ]] -then - echoout "$Usage: sudo $0\n$todownloadtarballs" - exit -fi +version="$(getVersion)" # Download the md5sum file # check for tarballs -if [[ -d "/tarballs" ]] -then - tarpath="/tarballs" -elif [[ -d "${HOME}/tarballs" ]] -then - tarpath="${HOME}/tarballs" -elif [[ -d "${PWD}/tarballs" ]] -then - tarpath="${PWD}/tarballs" -else - mkdir -p "${HOME}/tarballs" - tarpath="${HOME}/tarballs" - echoout "$Errorfindingthetarballpathsoitwasmadeat:\n${HOME}/tarballs" -fi +tarpath="$(findTarballDirectory)" rm -f "$md5file" wget "$md5src" retval="$?" if (( retval != 0 )) then - echoout "$errordownloading $md5src" - #read -p "$errordownloading $md5src" + ECHO "$errordownloading $md5src" fi # Remove old tarballs the create space for new tarballs -echoout "$Thereshouldbeenoughspaceforthenewtarball" +ECHO "$Thereshouldbeenoughspaceforthenewtarball" ls "${tarpath}"/* > /dev/null 2> /dev/null retval="$?" if (( retval != 0 )) then - df -h . - if [[ "$USEZENITY" == "true" ]] - then - zenity --class=OBI --question --title="$OneButtonInstaller" "${ZEN_ICON}" --text="$Removesomeoldtarballsonlyifnecessary" - case $? in - 0) ans="y";; - *);; - esac - else - read -p "$Removesomeoldtarballsonlyifnecessary (y/n)" ans - fi - - if [[ "$ans" == "y" ]] || [[ "$ans" == "Y" ]] - then - if [[ "$USEZENITY" == "true" ]] - then - for i in "${tarpath}"/*.tar.[gx]z - do - zenity --class=OBI --question --title="$OneButtonInstaller" --text="Remove $i" - retval="$?" - (( retval == 0 )) && rm "$i" - done - else - rm -i "${tarpath}"/*.tar.[gx]z - fi - df -h . - - if [[ "$USEZENITY" == "true" ]] - then - zenity --class=OBI --info "${ZEN_ICON}" --title="$OneButtonInstaller" --text="$ReadyToContinue" - else - read -p "$PressENTERtocontinue" - fi - fi + df -h . + if [[ "$USEZENITY" == "true" ]] + then + zenity --class=OBI --question --title="$OneButtonInstaller" "${ZEN_ICON}" --text="$Removesomeoldtarballsonlyifnecessary" + case $? in + 0) ans="y";; + *);; + esac + else + read -p "$Removesomeoldtarballsonlyifnecessary (y/n)" ans + fi + + if [[ "${ans,,}" == "y" ]] + then + if [[ "$USEZENITY" == "true" ]] + then + for i in "${tarpath}"/*.tar.[gx]z + do + zenity --class=OBI --question --title="$OneButtonInstaller" --text="$Remove $i" + retval="$?" + (( retval == 0 )) && rm "$i" + done + else + rm -i "${tarpath:?}"/*.tar.[gx]z + fi + df -h . + + if [[ "$USEZENITY" == "true" ]] + then + zenity --class=OBI --info "${ZEN_ICON}" --title="$OneButtonInstaller" --text="$ReadyToContinue" + else + read -p "$PressENTERtocontinue" + fi + fi fi #echo "93:${tarpath}" -# Make list of available new tarballs +# Make list of available new tarballs item=0 #for i in $(grep "${tarpath}" $md5file|cut -d / -f 2) for i in $(grep "tarballs" $md5file|cut -d / -f 2) do - if ! test -f "${tarpath}"/"$i" - then - item=$((item + 1)) - seltxt="$seltxt$item \"$i\" " + if [[ ! -f "${tarpath}"/"$i" ]] + then + item=$((item + 1)) + seltxt="$seltxt$item \"$i\" " # else # echo "You have already got $i" - fi + fi done #echo "108: item=$item; seltxt=$seltxt" # select tarball, go or quit if [[ "$USEZENITY" == "true" ]] then - conent=("$seltxt" "$ans_q" "$Quit") - ans=$(zenity --class=OBI --list "${ZEN_ICON}" --width=420 --height=480 --title "$OneButtonInstaller $version - $Downloadtarball" --text="$Pleaseselectatarballwiththearrowkeysscrollifnecessary" --column="$HOTKEY" --column="$Availabletarballs" ${conent[@]}) - ans="${ans:0:1}" - echo "$ans" + conent=("$seltxt" "$ans_q" "$Quit") + ans=$(zenity --class=OBI --list "${ZEN_ICON}" --width=420 --height=480 --title "$OneButtonInstaller $version - $Downloadtarball" --text="$Pleaseselectatarballwiththearrowkeysscrollifnecessary" --column="$HOTKEY" --column="$Availabletarballs" "${conent[@]}") + ans="${ans:0:1}" + echo "$ans" else - ans=$(dialog --backtitle "$OneButtonInstaller $version - $Downloadtarball" \ + ans=$(dialog --backtitle "$OneButtonInstaller $version - $Downloadtarball" \ --title "$Pleaseselectatarballwiththearrowkeysscrollifnecessary" \ --default-item "$choice" --colors --menu "$Availabletarballs" 17 76 $((item + 1)) \ -$seltxt "$ans_q" "$Quit" 3>&1 1>&2 2>&3 3>&- ) +"$seltxt" "$ans_q" "$Quit" 3>&1 1>&2 2>&3 3>&- ) fi choice="$ans" @@ -215,55 +198,55 @@ #for i in $(grep "${tarpath}" $md5file|cut -d / -f 2) for i in $(grep "tarballs" "$md5file"|cut -d / -f 2) do - if ! test -f "${tarpath}"/"$i" - then - item=$((item + 1)) - targ0="$i" - if [[ "$item" == "$choice" ]] - then - target="$targ0" - fi - fi + if [[ ! -f "${tarpath}"/"$i" ]] + then + item=$((item + 1)) + targ0="$i" + if [[ "$item" == "$choice" ]] + then + target="$targ0" + fi + fi done # Download tarball if [[ "$ans" == "$ans_q" ]] || [[ -z "$ans" ]] then - echoout "$Notarballdownloaded" + ECHO "$Notarballdownloaded" else - echoout "$Downloading: $target" - wget "$tblsrc/$target" - grep "tarballs/$target" "$md5file" > "$md5temp" - sed -i 's#tarballs/##' "$md5temp" + ECHO "$Downloading: $target" + wget "$tblsrc/$target" + grep "tarballs/$target" "$md5file" > "$md5temp" + sed -i 's#tarballs/##' "$md5temp" # echo -n "115:";cat "$md5temp" # mv "$target" "${tarpath}" - echoout "$Checkingmd5sum" + ECHO "$Checkingmd5sum" # testing bad md5sum # sed s/0/a/ "$md5temp" > ttt # mv ttt "$md5temp" - md5sum -c "$md5temp" - retval="$?" - if (( retval != 0 )) - then - echoout "*** $Badmd5sumtrytodownloadthetarballagain ***" + md5sum -c "$md5temp" + retval="$?" + if (( retval != 0 )) + then + ECHO "*** $Badmd5sumtrytodownloadthetarballagain ***" # rm "${tarpath}"/"$target" - rm "$target" - else - mv "$target" "${tarpath}" 2> /dev/null - retval="$?" - if (( retval != 0 )) - then - echoout "$CouldnotwritetotarballswhichisnormalinalivesessionSelecttarballcanstillfindthetarballautomatically" - fi - fi - rm "$md5temp" - if [[ "$USEZENITY" == "true" ]] - then - zenity --class=OBI --info "${ZEN_ICON}" --title="$OneButtonInstaller" --text="$ChecktheResult" - else - read -p "$ChecktheresultandpressEntertocontinue" - fi + rm "$target" + else + mv "$target" "${tarpath}" 2> /dev/null + retval="$?" + if (( retval != 0 )) + then + ECHO "$CouldnotwritetotarballswhichisnormalinalivesessionSelecttarballcanstillfindthetarballautomatically" + fi + fi + rm "$md5temp" + if [[ "$USEZENITY" == "true" ]] + then + zenity --class=OBI --info "${ZEN_ICON}" --title="$OneButtonInstaller" --text="$ChecktheResult" + else + read -p "$ChecktheresultandpressEntertocontinue" + fi fi diff -Nru obi-installer-3.3.0ubuntu0/OBI/findtbl obi-installer-3.4.0ubuntu0/OBI/findtbl --- obi-installer-3.3.0ubuntu0/OBI/findtbl 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/findtbl 2018-03-15 13:13:10.000000000 +0000 @@ -4,51 +4,49 @@ ########################################################### FOUNDtbl=$(eval_gettext "Found Tarball") ########################################################### -[[ -f "$HOME/usezenity" ]] && USEZENITY=$(cat "$HOME/usezenity") -ICONPATH="/usr/share/icons/hicolor/48x48/apps/obi-window-icon.png" -ZEN_ICON="--window-icon=$ICONPATH" -echoout() { - if [[ "$USEZENITY" == "true" ]] - then - zenity --class=OBI --info --timeout=7 --title="$OneButtonInstaller" "$ZEN_ICON" --text="$*" - retval="$?" - echo -e "
[fintbl]
$*" >> "${HOME}"/obi-installer.log - [[ "$retval" != 0 ]] && echo -e "
[fintbl]
CANCELED" >> "${HOME}"/obi-installer.log && exit - else - dialog --infobox "$*" 0 0 - sleep .7 - echo -e "[fintbl] $*" >> "${HOME}"/obi-installer.log - fi + +################################################ +## Source our handy functions!! +## make sure they are in the PATH first +OBI_SHARE_DIR="/usr/share/OBI" +if [[ -d "${OBI_SHARE_DIR}" ]] && [[ "${PATH/$OBI_SHARE_DIR}" == "${PATH}" ]] +then + PATH="${PATH}:/usr/share/OBI" + export PATH +elif [[ "${PATH/$PWD}" == "${PATH}" ]] +then + PATH="${PATH}:${PWD}" + export PATH +fi +source obi-functions || exit +################################################ +ECHO() { + echoOut "findtbl" "$*" } -LOGecho(){ - if [[ "$USEZENITY" == "true" ]] - then - echo -e "
[fintbl]
$*" >> "${HOME}"/obi-installer.log - else - echo -e "[fintbl] $*" >> "${HOME}"/obi-installer.log - fi +LOG_ECHO(){ + echoLOG "findtbl" "$*" } -source functions + output=$(selector_of_tarball_dir) if [[ -z "$output" ]] then - output="${HOME}/selected" + output="${HOME}/selected" fi is_archive(){ - FILEtoCHECK="$1" - case $FILEtoCHECK in - *.tar.gz) - echo "$FILEtoCHECK" - return - ;; - *.tar.xz) - echo "$FILEtoCHECK" - return - ;; - initrd.img)return;; + FILEtoCHECK="$1" + case $FILEtoCHECK in + *.tar.gz) + echo "$FILEtoCHECK" + return + ;; + *.tar.xz) + echo "$FILEtoCHECK" + return + ;; + initrd.img)return;; - *);; - esac + *);; + esac ## TODO should we support img files at some point?? # *.img) # echo "$FILEtoCHECK" @@ -56,36 +54,36 @@ # ;; } recursive_search(){ - ITEM="$1" - if [[ -f "$ITEM" ]] - then - TARBALL=$(is_archive "$ITEM") - [[ -n "$TARBALL" ]] && echo "$TARBALL" && exit - fi - if [[ -d "$ITEM" ]] - then - for thing in "$ITEM"/** - do - recursive_search "$thing" - done + ITEM="$1" + if [[ -f "$ITEM" ]] + then + TARBALL=$(is_archive "$ITEM") + [[ -n "$TARBALL" ]] && echo "$TARBALL" && exit + fi + if [[ -d "$ITEM" ]] + then + for thing in "$ITEM"/** + do + recursive_search "$thing" + done fi } main_search(){ - testDIR="$1" - [[ -z "$testDIR" ]] && testDIR="/media" - testDIR="${testDIR%/}" - for dir in "$testDIR"/** - do - FILE=$(recursive_search "$dir") - if [[ -n "$FILE" ]] && [[ -f "$FILE" ]] - then - LOGecho "$FOUNDtbl $FILE" - echo "$FILE" - fi - done + testDIR="$1" + [[ -z "$testDIR" ]] && testDIR="/media" + testDIR="${testDIR%/}" + for dir in "$testDIR"/** + do + FILE=$(recursive_search "$dir") + if [[ -n "$FILE" ]] && [[ -f "$FILE" ]] + then + LOG_ECHO "$FOUNDtbl $FILE" + echo "$FILE" + fi + done } ## TODO # list devices, and mount them to look for the tarball -foundTBL=$(main_search) +foundTBL=$(main_search "$@") [[ -f "$foundTBL" ]] && echo "$foundTBL" > "$output" diff -Nru obi-installer-3.3.0ubuntu0/OBI/fix-device obi-installer-3.4.0ubuntu0/OBI/fix-device --- obi-installer-3.3.0ubuntu0/OBI/fix-device 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/fix-device 2018-03-15 13:13:10.000000000 +0000 @@ -1,52 +1,60 @@ #! /bin/bash -. gettext.sh +eval_gettext(){ + echo -e "$*" +} +source gettext.sh export TEXTDOMAIN=obi-installer + ########################################################### Checking=$(eval_gettext "Checking device:") -OneButtonInstaller=$(eval_gettext "One Button Installer") FIXER=$(eval_gettext "Fix Device") ########################################################### -[[ -f "$HOME/usezenity" ]] && USEZENITY=$(cat "$HOME/usezenity") -LOGecho(){ - if [ "$USEZENITY" == "true" ] - then - echo -e "
[fix-device]
$*" >> "${HOME}"/obi-installer.log - else - echo -e "[fix-device] $*" >> "${HOME}"/obi-installer.log - fi + +################################################ +## Source our handy functions!! +## make sure they are in the PATH first +OBI_SHARE_DIR="/usr/share/OBI" +if [[ -d "${OBI_SHARE_DIR}" ]] && [[ "${PATH/$OBI_SHARE_DIR}" == "${PATH}" ]] +then + PATH="${PATH}:/usr/share/OBI" + export PATH +elif [[ "${PATH/$PWD}" == "${PATH}" ]] +then + PATH="${PATH}:${PWD}" + export PATH +fi +source obi-functions || exit +################################################ + +ECHO() { + echoOut "fix-device" "$*" } -curlang="$LANG" -ICONPATH="/usr/share/icons/hicolor/48x48/apps/obi-window-icon.png" -ZEN_ICON="--window-icon=$ICONPATH" -echoout() { - if [[ "$USEZENITY" == "true" ]] - then - zenity --class=OBI --info --timeout=7 --title="$OneButtonInstaller" "$ZEN_ICON" --text="$*" - echo -e "
[fix-device]
$*" >> "${HOME}"/obi-installer.log - else - dialog --infobox "$*" 0 0 - sleep .7 - echo -e "[fix-device] $*" >> "${HOME}"/obi-installer.log - fi +LOG_ECHO(){ + echoLOG "fix-device" "$*" } -source functions -prgnam="$OneButtonInstaller" -[[ -z "$dpath" ]] && dpath=$(getDpath) -version=$(getVersion) -[[ -n "$version" ]] && version="$version $FIXER" -[[ -z "$version" ]] && version="$prgnam $FIXER" +[[ -z "$USEZENITY" ]] && getZenity + +curlang="$LANG" + +[[ -z "$dpath" ]] && dpath="$(getDpath)" ## from functions +version="$(getVersion)" ## from functions +version="$version $FIXER" + + # make command and run command, 'here we go' curlang="$LANG" partitions="$dpath/partitions" -[[ ! -f "$partitions" ]] && echoout "Cannot find partitions file" && exit +[[ ! -f "$partitions" ]] && ECHO "Cannot find partitions file" && exit "${dpath}"/select-part2 root zmktbl - while read LINE || [[ "$LINE" ]] - do - case $LINE in - obi-root:*)dest="${LINE/*:}";; - *);; - esac - done < "$partitions" + +while read LINE || [[ "$LINE" ]] +do + case $LINE in + obi-root:*)dest="${LINE/*:}";; + *);; + esac +done < "$partitions" + [[ -z "$dest" ]] && exit echo > "$partitions" LANG="C" @@ -54,15 +62,15 @@ ANS=$(umount --force "$dest" 2>&1) retval=$? #make sure it unmounts and if it wasn't mounted just move on -(( retval != 0 )) && [[ "$ANS" == "${ANS/not}" ]] && echoout "Can not unmount $dest" && exit +(( retval != 0 )) && [[ "$ANS" == "${ANS/not}" ]] && ECHO "Can not unmount $dest" && exit LANG="$curlang" if [ "$USEZENITY" == "true" ] then - TItle="$Checking ${dest}" - ThisTerm=$(which xterm) - [[ -n "$ThisTerm" ]] && xterm -fa default -fs 14 -title "$TItle" -e "bash -c \"sudo e2fsck -f \"$dest\"; sleep 3\"" - [[ -z "$ThisTerm" ]] && x-terminal-emulator -t "$TItle" -e "bash -c \"sudo e2fsck -f \"$dest\"; sleep 3\"" - [[ -z "$ThisTerm" ]] && LOGecho "No terminal emulator found" + TItle="$Checking ${dest}" + ThisTerm="$(which xterm)" + [[ -n "$ThisTerm" ]] && xterm -fa default -fs 14 -title "$TItle" -e "bash -c \"sudo e2fsck -f \"$dest\"; sleep 3\"" + [[ -z "$ThisTerm" ]] && x-terminal-emulator -t "$TItle" -e "bash -c \"sudo e2fsck -f \"$dest\"; sleep 3\"" + [[ -z "$ThisTerm" ]] && LOG_ECHO "No terminal emulator found" else - sudo e2fsck -f "$dest" + sudo e2fsck -f "$dest" fi diff -Nru obi-installer-3.3.0ubuntu0/OBI/functions obi-installer-3.4.0ubuntu0/OBI/functions --- obi-installer-3.3.0ubuntu0/OBI/functions 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/functions 1970-01-01 00:00:00.000000000 +0000 @@ -1,954 +0,0 @@ -#!/bin/bash -. gettext.sh -export TEXTDOMAIN=obi-installer -########################################################### -Helpinfotoselectdrive=$(eval_gettext "Help info to select drive") -OK=$(eval_gettext "OK") -keystoscrollthishelpinfo=$(eval_gettext "Use Arrow PgUp PgDn Home End keys to scroll this help info") -SelectDevice=$(eval_gettext "Select device") -warningandoverview=$(eval_gettext "warning and overview") -## please leave \n and \Zn and \Z1 \n is a new line, \Z1 and \Zn make text BOLD -NEEDbootDEV=$(eval_gettext "You NEED to choose a device for the bootloader") -Unmountthetargetdeviceifmounted=$(eval_gettext ": the device will be completely overwritten\Zn\nGet more help to select device at the Starter menu\n\Z1Unmount the target device if mounted") -WARNING=$(eval_gettext "WARNING") -## HotKey for: "toggle USB-only" -answer_u=$(eval_gettext "u") -toggleUSBonly=$(eval_gettext "toggle USB-only") -showalldrives=$(eval_gettext "show all drives") -hideotherdrives=$(eval_gettext "hide other drives") -quitinstalling=$(eval_gettext "quit installing") -andContinue=$(eval_gettext "and continue") -Pleaseselectadevicewiththearrowkeys=$(eval_gettext "Please select a device with the arrow keys, scroll if necessary") -Go=$(eval_gettext "Go") -## Hotkey for: "Quit" -ans_q=$(eval_gettext "q") -Quit=$(eval_gettext "Quit") -wiping=$(eval_gettext "wiping") -## please leave \n this is a new line character -installingtheoperatingsystem=$(eval_gettext "installing\n\nthe operating system") -FINALWARNING=$(eval_gettext "FINAL WARNING") -beforewipingandinstalling=$(eval_gettext "before wiping and installing !!!\nDo you really want to wipe and install to this device?") -##SPACEBAR and SLASH are keyboard keys -SPACEBARSLASH=$(eval_gettext "SPACEBAR: copy selection to text-entry box, SLASH: show directory content") -Selectsourcefile=$(eval_gettext "Select source file") -normalfiletypefilter=$(eval_gettext "normal, file type filter") -Findisoandimagefiles=$(eval_gettext "Find and select among iso and image files, or with a general selector.") -## please leave \n and \Zn and \Z1 \n is a new line, \Z1 and \Zn make text BOLD -Increasethesizeoftheterminalwindow=$(eval_gettext "Increase the size of the terminal window, particularly the width!\Zn\nThen the menus to 'select file' work better to show long file names.\n\n\Z1Avoid spaces and special characters in directory and file names!") -## please leave \n and \Zn and \Z1 \n is a new line, \Z1 and \Zn make text BOLD -Avoidspacesandspecialcharacters=$(eval_gettext "Avoid spaces and special characters in directory and file names!\Zn\nUse a high resolution screen, if possible more than 80 characters wide!\nThen the menus to 'select file' work better to show long file names.\n\n\Z1Type text in the bottom text box!\Zn Use the upper text box(es) only to\npaste text into the bottom window (with the space key). The slash key\ncan be used to 'finish' moving to another directory.") -selectactionwithletterorarrow=$(eval_gettext "Please select an action with a letter key or the arrow keys") -nosearchforlinkedfiles=$(eval_gettext "iso and image file selector (easy), no search for linked files") -## Hotkey for: "iso and image file selector (easy), no search for linked files" -ans_s=$(eval_gettext "s") -includeLinkedfiles=$(eval_gettext "iso and image file selector (easy), include Linked files (may fail)") -## Hotkey for: "iso and image file selector (easy), include Linked files (may fail)" -ans_l=$(eval_gettext "l") -GeneralFileselector=$(eval_gettext "General File selector") -## Hotkey for: "General File selector" -ans_g=$(eval_gettext "g") -Amongfilesselecteddirectory=$(eval_gettext "Among files in the previously selected directory tree,\nselect file type to display") -Selectfiletypetodisplay=$(eval_gettext "Select file type to display") -## Hotkey for: "all files suitable as source files" -ans_a=$(eval_gettext "a") -allfilessuitable=$(eval_gettext "all files suitable as source files") -## ISO is a file format for CD images -## Hotkey for: "only ISO files" -ans_iso=$(eval_gettext "i") -onlyISOfiles=$(eval_gettext "only ISO files") -## Hotkey for: "only image files (with and without compression)" -ans_m=$(eval_gettext "m") -onlyimagefiles=$(eval_gettext "only image files (with and without compression)") -Doyouwanttoinstallit=$(eval_gettext "Do you want to install it?") -TheprogramPV=$(eval_gettext "The program 'pv' can show the progress during the installation.") -Preparesystemuptodate=$(eval_gettext "Prepare by making the system up to date") -butitisnotinstalled=$(eval_gettext "however, it is not installed.") -Bootedfrom=$(eval_gettext "Booted from") -Availabledevices=$(eval_gettext "Available devices") -Hotkey=$(eval_gettext "Hotkey") -thetargetwillbe=$(eval_gettext "The target device will be:") -TARGET=$(eval_gettext "Target Device:") -OneButtonInstaller=$(eval_gettext "One Button Installer") -Checkthisboxifyouarereadytogo=$(eval_gettext "Click this if you are ready to go") -ErrorfindingtheOBIselectedpath=$(eval_gettext "Error finding the OBI selected path") -ScriptnotfoundChangedirectory=$(eval_gettext "Script not found. Change directory")\ -########################################################### -[[ -f "$HOME/usezenity" ]] && USEZENITY=$(cat "$HOME/usezenity") -ICONPATH="/usr/share/icons/hicolor/48x48/apps/obi-window-icon.png" -ZEN_ICON="--window-icon=$ICONPATH" -LENGTH=0 -curlang="$LANG" -[[ -z "$prgnam" ]] && prgnam="$OneButtonInstaller" -echoout() { - if [[ "$USEZENITY" == "true" ]] - then - zenity --class=OBI --info --timeout=7 --title="$OneButtonInstaller" "$ZEN_ICON" --text="$*" - echo -e "
[functions]
$*" >> "${HOME}"/obi-installer.log - else - dialog --infobox "$*" 0 0 - sleep .7 - echo -e "[functions] $*" >> "${HOME}"/obi-installer.log - fi -} -LOGecho(){ - if [[ "$USEZENITY" == "true" ]] - then - echo -e "
[functions]
$*" >> "${HOME}"/obi-installer.log - else - echo -e "[functions] $*" >> "${HOME}"/obi-installer.log - fi -} -getVersion(){ - APTCACHE=$(which apt-cache) - if [[ -n "${APTCACHE}" ]] - then - LOGecho "$(apt-cache policy one-button-installer)" - ver_no=$(apt-cache policy one-button-installer | grep Installed: | sed 's/Installed://' | sed 's/ubuntu.*//') - version="$prgnam $ver_no" - fi - if [[ -z "${version}" ]] - then - version="$prgnam" - fi - echo "$version" -} -[[ -z "${version}" ]] && version=$(getVersion) -getDpath(){ - if [[ -f "/home/$USER/obi" ]] - then - dpath="/home/$USER" - elif [[ -f "$PWD/obi" ]] - then - dpath="$PWD" - elif [[ -f "${HOME}/obi" ]] - then - dpath="${HOME}" - elif [[ -f "/usr/share/OBI/obi" ]] - then - dpath="/usr/share/OBI" - else - echoout "$ScriptnotfoundChangedirectory" - exit 1 - fi - echo "$dpath" -} -[[ -z "$dpath" ]] && dpath=$(getDpath) -[[ -z "$obi_system" ]] && obi_system=$(cat "$HOME/OSname") -WARN_COLOR="#cc0000" -BG_COLOUR="white" -mkhelp(){ -hlptxt="$HOME/help-mkusb.txt" -# make help text -if [[ ! -f "$hlptxt" ]] -then -# echo "Collecting data for 'Help to select drive'" - br="
" - preopen="

"
- preclose="
$br" - spanopen="$br$br" - spanclose="$br$br$preopen" - - echo ""> "$hlptxt" - [[ "$USEZENITY" == "true" ]] && echo "" >> "$hlptxt" - echo "Collected data to help select target drive" >> "$hlptxt" - [[ "$USEZENITY" == "true" ]] && echo "$br" >> "$hlptxt" - echo "_______________________________________________" >> "$hlptxt" - echo " " >> "$hlptxt" - #echo "lshw -class disk #####" >> "$hlptxt" - #lshw -class disk >> "$hlptxt" - [[ "$USEZENITY" == "true" ]] && echo "$spanopen" >> "$hlptxt" - echo "list_drives ##### script built into $prgnam" >> "$hlptxt" - [[ "$USEZENITY" == "true" ]] && echo "$spanclose" >> "$hlptxt" -listeddrives=$("$dpath"/list_drives) - [[ "$USEZENITY" == "true" ]] && listeddrives="${listeddrives//\\n/
}" - echo -e "$listeddrives">> "$hlptxt" - [[ "$USEZENITY" == "true" ]] && echo "$preclose" >> "$hlptxt" - echo "_______________________________________________" >> "$hlptxt" - [[ "$USEZENITY" == "true" ]] && echo "$spanopen" >> "$hlptxt" - echo "ls -l /dev/disk/by-id| grep [a-z]$|tr -s ' ' ' ' \\" >> "$hlptxt" - echo "|cut -d ' ' -f 9,11|sort -k2|grep -e \^a -e \^u \\" >> "$hlptxt" - echo "|sed 's#../..#/dev#' ##### also empty mass storage devices" >> "$hlptxt" - [[ "$USEZENITY" == "true" ]] && echo "$spanclose" >> "$hlptxt" - ls -l /dev/disk/by-id| grep "[a-z]$"|tr -s ' ' ' ' \ - |cut -d ' ' -f 9,11|sort -k2|grep -e \^a -e \^u \ - |sed 's#../..#/dev#' >> "$hlptxt" - [[ "$USEZENITY" == "true" ]] && echo "$preclose" >> "$hlptxt" - echo "_______________________________________________" >> "$hlptxt" - [[ "$USEZENITY" == "true" ]] && echo "$spanopen" >> "$hlptxt" - echo "lsusb|sort -k 4,4 -k 1 #####" >> "$hlptxt" - [[ "$USEZENITY" == "true" ]] && echo "$spanclose" >> "$hlptxt" - lsusb|sort -k 4,4 -k 1 >> "$hlptxt" - [[ "$USEZENITY" == "true" ]] && echo "$preclose" >> "$hlptxt" - echo "_______________________________________________" >> "$hlptxt" - [[ "$USEZENITY" == "true" ]] && echo "$spanopen" >> "$hlptxt" - echo "fdisk -lu 2>/dev/null|grep \"/dev/[^f]d\"|sort #####" >> "$hlptxt" - [[ "$USEZENITY" == "true" ]] && echo "$spanclose" >> "$hlptxt" - fdisk -lu 2>/dev/null|grep "/dev/[^f]d"|sort >> "$hlptxt" - [[ "$USEZENITY" == "true" ]] && echo "$preclose" >> "$hlptxt" - echo "_______________________________________________" >> "$hlptxt" - [[ "$USEZENITY" == "true" ]] && echo "$spanopen" >> "$hlptxt" - echo "parted -ls #####" >> "$hlptxt" - [[ "$USEZENITY" == "true" ]] && echo "$spanclose" >> "$hlptxt" - parted -ls >> "$hlptxt" - [[ "$USEZENITY" == "true" ]] && echo "$preclose" >> "$hlptxt" - echo "_______________________________________________" >> "$hlptxt" - [[ "$USEZENITY" == "true" ]] && echo "$spanopen" >> "$hlptxt" - echo "blkid|sort #####" >> "$hlptxt" - [[ "$USEZENITY" == "true" ]] && echo "$spanclose" >> "$hlptxt" - blkid|sort >> "$hlptxt" - [[ "$USEZENITY" == "true" ]] && echo "$preclose" >> "$hlptxt" - echo "_______________________________________________" >> "$hlptxt" - [[ "$USEZENITY" == "true" ]] && echo "$spanopen" >> "$hlptxt" - echo "lsblk -f #####" >> "$hlptxt" - [[ "$USEZENITY" == "true" ]] && echo "$spanclose" >> "$hlptxt" - lsblk -f >> "$hlptxt" - [[ "$USEZENITY" == "true" ]] && echo "$preclose" >> "$hlptxt" - if [ -n "$(df|grep '/dev/[^f]d'|sort )" ] - then - [[ "$USEZENITY" == "true" ]] && echo "$spanopen" >> "$hlptxt" - echo "df|grep \"/dev/[^f]d\"|sort #####" >> "$hlptxt" - [[ "$USEZENITY" == "true" ]] && echo "$spanclose" >> "$hlptxt" - df|grep "/dev/[^f]d"|sort >> "$hlptxt" - [[ "$USEZENITY" == "true" ]] && echo "$preclose" >> "$hlptxt" - echo "_______________________________________________" >> "$hlptxt" - fi - #echo "--------------------------------------------------------------------" -# echo "This help text is read with less $hlptxt" - #### xterm -geometry 120x40 -title "less $hlptxt" -e less "$hlptxt" & -fi - btitlh="$version - $Helpinfotoselectdrive" - xtitle="$keystoscrollthishelpinfo" -if [[ "$USEZENITY" == "true" ]] -then - MSG=$(cat "$hlptxt") - MSG="${MSG//\\n/
}" - MSG=" - -${MSG} - -" - echo "$MSG" >"$hlptxt" - zenity --class=OBI --text-info "${ZEN_ICON}" --title="$btitlh" --html --width=600 --height=500 --filename="$hlptxt" -else - dialog --backtitle "$btitlh" --title "$xtitle"\ - --exit-label "$OK" \ - --no-shadow --textbox "$hlptxt" 0 0 -fi -} - -####################################################################### -####################################################################### - -check_packages(){ - -# check pipe view and offer installation - -if ! "$checked_pack" -then - if [[ -n "$(which pv)" ]] - then - pvplug=true - else - if [[ "$USEZENITY" == "true" ]] - then - zenity --class=OBI --question "${ZEN_ICON}" --title="$OneButtonInstaller" --text="$TheprogramPV\n$Doyouwanttoinstallit" - case $? in - 0) - pvi="y";; - *) - pvi="n";; - esac - else - echoout "$TheprogramPV" - read -p "$Doyouwanttoinstallit (y/N)" pvi - fi - - if [[ "$pvi" == "y" ]] - then - echo "apt-get install pv" - apt-get install --yes pv - fi - if [[ -n "$(which pv)" ]] - then - pvplug=true ## what is this for?? - else - pvplug=false ## what is this for?? - fi - fi -# echo $pvplug - -# check menu packages and offer installation - - menu_package_installer needs dialog "mkusb version 7.4 works without it" - menu_package_installer wants zenity "mkusb can work without it." -# menu_package_installer wants smartctl "mkusb can work without it." smartmontools - - zenity --class=OBI --info --text="test" --timeout=1 2> /dev/null - if [[ "$?" -eq 5 ]] - then - zenityplug=true - else - zenityplug=false - fi - - checked_pack=true -fi -} - -####################################################################### -####################################################################### - -menu_package_installer() { - -# $1 "needs" or "wants" -# $2 program name -# $3 informative test string -# $4 package name (if different from program name) - -# Example (shows full syntax but smartctl is *not* used by mkusb) -# menu_package_installer wants smartctl "mkusb can work without it." smartmontools - - -if [[ -z "$4" ]] -then - package="$2" -else - package="$4" -fi -which "$2" > /dev/null -if [ "$?" != "0" ] -then - if [[ "$USEZENITY" == "true" ]] - then - zenity --class=OBI --question --title="$OneButtonInstaller" "${ZEN_ICON}" --text="mkusb $1 the program '$2' for the menus.\n$Doyouwanttoinstallit" - case $? in - 0) - pvi="y";; - *) - pvi="n";; - esac - else - echoout "mkusb $1 the program '$2' for the menus." - read -p "$Doyouwanttoinstallit (y/N)" pvi - fi - if [[ "$pvi" == "y" ]] - then - echoout "$Preparesystemuptodate\napt-get update && apt-get upgrade" - sleep 2 - apt-get update && apt-get upgrade - echoout "Install program $2 ... in package $package\napt-get install --yes --no-install-recommends $package" - sleep 2 - apt-get install --yes --no-install-recommends "$package" - fi - which "$2" > /dev/null - if [[ "$?" != "0" ]] - then - echoout "$version $1 $2 $butitisnotinstalled.\n$3" - if [[ "$1" == "needs" ]] - then - exit - else - read -t 3 - fi - fi -fi -} - -####################################################################### -####################################################################### - -# --colors -# Interpret embedded "\Z" sequences in the dialog text by the following -# character, which tells dialog to set colors or video attributes: -# 0 through 7 are the ANSI used in curses: -# 0 1 2 3 4 5 6 7 -# black, red, green, yellow, blue, magenta, cyan and white respectively. -# -# Bold is set by 'b', reset by 'B'. -# Reverse is set by 'r', reset by 'R'. -# Underline is #set by 'u', reset by 'U'. -# The settings are cumulative, e.g., "\Zb\Z1" makes the following text -# bold (perhaps #bright) red. Restore normal settings with "\Zn". - -######################################################################## -######################################################################## - -init_dialog(){ -# create the file for run-time configuration, with text names for colours - dialog --create-rc "$HOME/.dialogrc" -# initiate colours - sed -i 's/use_colors.*/use_colors = ON/' "$HOME/.dialogrc" - sed -i 's/screen_color =.*/screen_color = (CYAN,BLUE,ON)/' "$HOME/.dialogrc" -} - -######################################################################## -######################################################################## - -warning_dialog(){ -# set red warning screen background - sed -i 's/screen_color =.*/screen_color = (yellow,red,ON)/' "$HOME/.dialogrc" -} - -######################################################################## -######################################################################## - -normal_dialog(){ -# set blue normal screen background - sed -i 's/screen_color =.*/screen_color = (CYAN,BLUE,ON)/' "$HOME/.dialogrc" -} - -######################################################################## -######################################################################## -selector_of_tarball_dir(){ - if [[ -f /usr/share/OBI/selected ]] - then - selected="/usr/share/OBI/selected" - elif [[ -f "${HOME}"/selected ]] - then - selected="${HOME}/selected" - elif [[ -d "${PWD}/selected" ]] - then - selected="${PWD}/selected" - else - selected="" - fi - echo "$selected" -} -getTarballFile(){ - TARBALLfile=$(selector_of_tarball_dir) - [[ -f "$TARBALLfile" ]] && TARBALLfile="$( < $TARBALLfile)" - echo "$TARBALLfile" -} -####################################################################### -####################################################################### -findTARBALLdev(){ - LOOKFOR="$1" - ANSWER="" - IFS=" -" - things=($(mount)) - for _device in "${things[@]}" - do - thisone=$(echo "${_device}" | cut -f3 -d' ') - theOne=$(echo "${_device}" | cut -f1 -d' ') - [[ "${LOOKFOR/$thisone}" != "${LOOKFOR}" ]] && ANSWER="$theOne" - done - [[ -n "$ANSWER" ]] && echo "$ANSWER" -} - -list_device_dialog(){ - [[ -z "$dpath" ]] && dpath=$(getDpath) -## - p1="$1" -## Name in the dialog - dialog_name="$2" - [[ -z "$dialog_name" ]] && dialog_name="$SelectDevice - $andContinue" - LENGTH="${#dialog_name}" - use_warn="${3^^}" ## TRUE - use_GRUB="${4^^}" ## TRUE - DisplayText="$5" - DisplayText="$DisplayText\n$Pleaseselectadevicewiththearrowkeys" - -# check if all drives should be available at start (not only USB) -# usbonly default true, can be changed with parameter2 'all' - if [[ "$p1" == "all" ]] || [[ "$p1" == "anh" ]] - then - usbonly=false - else - usbonly=true - fi -# make command and run command, 'here we go' - ans=-1 - choice=1 - target= - LC_ALL=C - LANG=C - tmpstr= - ltest0=$(grep -m 1 " / " /etc/mtab|cut -d ' ' -f 1) - if [[ "$ltest0" == "/cow" ]] || [[ "$ltest0" == "aufs" ]] || [[ "$ltest0" == "rootfs" ]] || [[ "$ltest0" == "overlay" ]] - then - ltest1=$(grep ' /isodevice' /etc/mtab|cut -c 5-8) - if [[ "$ltest1" != "" ]] - then - livedrive=$ltest1 - else - ltest1=$(grep ' /cdrom' /etc/mtab|cut -c 5-8) - if [[ "$ltest1" != "" ]] - then - livedrive=$ltest1 - else - ltest1=$(grep ' iso9660' /etc/mtab|grep -v ' /media'|grep -v ' /mnt'|cut -c 5-8) - if [[ "$ltest1" != "" ]] - then - livedrive=$ltest1 - else - livedrive="not_found" - fi - fi - fi - elif [ "${ltest0/\/dev\/[^f]d}" != "$ltest0" ] - then - livedrive=$(grep " / " /etc/mtab|cut -c 5-8) - else - livedrive="not_found" - fi - tmpstr=$("$dpath"/list_drives) - [[ -z "$tmpstr" ]] && LOGecho "[WARNING] NO DRIVES FOUD.. this in an error" - LOGecho "ltest0=$ltest0\nltest1=$ltest1\nlivedrive=$livedrive\ntmpstr=$tmpstr\nusbonly=$usbonly" -#echo $tmpstr -#read -p "press enter to continue" - tmpstr="$tmpstr\n\n$Bootedfrom: /dev$livedrive" - - while [[ "$ans" == "$answer_u" ]] || (( ans < 0 )) - do - if $usbonly - then - ufl=usb ## what is this for?? - else - ufl=d ## what is this for?? - fi - - if [[ "$use_warn" == "TRUE" ]] - then - MSG=" \Z1$WARNING $Unmountthetargetdeviceifmounted\Zn\n\n$tmpstr\n$usbstr" - if [[ "$USEZENITY" == "true" ]] - then - ## convert dialog style warning to html style - MSG="${MSG//\\Z1/}" - - MSG=" - -${MSG} - -" - - ## convert dialog style warning to html style - MSG="${MSG//\\Zn/}" - MSG="${MSG//\\Z5/}" - MSG="${MSG//\\Zb/}" - MSG="${MSG//\\Z4/}" - MSG="${MSG//\\Z7/}" - MSG="${MSG//\\Z1/}" - MSG="${MSG//\\n/
}" - - ## DISPLAY HTML MESSAGE - echo "$MSG" | zenity --class=OBI --text-info --width=690 --height=375 "${ZEN_ICON}" --title="$version - $SelectDevice - $warningandoverview" --html --filename="/dev/stdin" - else - dialog --backtitle "$version - $SelectDevice - $warningandoverview" \ - --colors --no-collapse --cr-wrap --no-shadow --msgbox "$MSG" 0 0 - fi - fi ## use the warning dialog - aind=0 - bind=0 - unset adev - unset atxt - unset bvar -#"$dpath"/list_drives "$usbonly"|tr -s ' ' ' '|cut -d ' ' -f 4 -#read -p 'Press enter to continue at list_drives' - if [[ -z "$LENGTH" ]] - then - LENGTH=0 - fi - -#-----------------------------------------------------------------------------# -#DON'T UNMOUNT DEVICE WITH TARBALL!!!!!! -#-----------------------------------------------------------------------------# - TARBALLfile=$(getTarballFile) - DONTumountDRIVE=$(findTARBALLdev "$TARBALLfile") - if [[ -z "$DONTumountDRIVE" ]] - then - LOGecho "[WARNING] selected tarball device is not mounted?!?!?" - else - LOGecho "DON'T unmount: $DONTumountDRIVE for $TARBALLfile" - fi - - for DEVICE in $("$dpath"/list_drives "$usbonly"|tr -s ' ' ' '|cut -d ' ' -f 4) - do -# echo $j - busy=0 - if [[ "$use_GRUB" != "TRUE" ]] - then - for unmountDEV in $(grep "$DEVICE" /etc/mtab|sed s#\ /.*##) - do - if [[ "${DONTumountDRIVE/$unmountDEV}" == "${DONTumountDRIVE}" ]] - then - ## this isn't the same lets unmount it - umount "$unmountDEV" 2>/dev/null - retval="$?" - fi - if [[ "$retval" == "1" ]] - then - busy=1 - fi - done - fi - tj=$("$dpath"/list_drives "$usbonly"|grep "$DEVICE") - -# echo "${tj:0:7}" -# echo "${tj}" -# read -p "select-device at Warning and Error" - if [[ "${tj:1:7}" == "Warning" ]] || [[ "${tj:1:5}" == "Error" ]] - then - tj=$(fdisk -lu "$DEVICE" 2>/dev/null|grep "$DEVICE":|sed s/\,\ .*//) - fi - if [[ "$DEVICE" == "/dev$livedrive" ]] - then - [[ "$use_GRUB" != "TRUE" ]] && adev[$aind]="$ans_q" - [[ "$USEZENITY" != "true" ]] && atxt[$aind]="\Z5\Zb${tj/Name:/Live:}\Zn" - [[ "$USEZENITY" == "true" ]] && atxt[$aind]="${tj/Name:/Live:}" - aind=$((aind + 1)) - elif [[ "$busy" == "1" ]] - then - [[ "$use_GRUB" != "TRUE" ]] && adev[$aind]="$ans_q" - [[ "$USEZENITY" != "true" ]] && atxt[$aind]="\Z4\Zb${tj/Name:/Busy:}\Zn" - [[ "$USEZENITY" == "true" ]] && atxt[$aind]="${tj/Name:/Busy:}" - aind=$((aind + 1)) - else -## these len,lenny,lentil variables are all -## LENGTH variables for different text I just made fun names - len="${#DEVICE}" - len=$(( len )) - lenny="${#tj}" - lenny=$(( lenny )) - lentil=$(( len + lenny )) - if (( lentil > LENGTH )) - then - export LENGTH=$(( lentil )) - fi - adev[$aind]="$DEVICE" - atxt[$aind]="$tj" - aind=$((aind + 1)) - fi - done - - adev[$aind]="$answer_u" - if $usbonly - then - atxt[$aind]="$toggleUSBonly; $showalldrives" - else - atxt[$aind]="$toggleUSBonly; $hideotherdrives" - fi - [[ "$use_GRUB" != "TRUE" ]] && aind=$((aind + 1)) - [[ "$use_GRUB" != "TRUE" ]] && adev[$aind]="$ans_q" - [[ "$use_GRUB" != "TRUE" ]] && atxt[$aind]="$quitinstalling" - aind=$((aind + 1)) - for (( xi=0; xi < aind ; xi++ )) - do - if [[ "${adev[$xi]}" == "$answer_u" ]] - then - bvar[$bind]="$answer_u" - elif [[ "${adev[$xi]}" == "$ans_q" ]] - then - [[ "$use_GRUB" != "TRUE" ]] && bvar[$bind]="$ans_q" - else - bvar[$bind]=$((xi+1)) - fi - bind=$(($bind + 1)) - bvar[$bind]="${atxt[$xi]}" - bind=$(($bind + 1)) - done - -# select device - the Mkusb button to go - -#echo "aind=$aind" -#echo "${bvar[@]}" -#read -p 'stop at Go ahead menu' - - if [[ "$USEZENITY" == "true" ]] - then - W=$LENGTH - WIDTH=$(( W )) - WIDTH=$(( WIDTH * 12 )) - LOGecho "Window sizing\n Text length:${LENGTH}\nGuessed Width=$WIDTH (if this is too small it will default to 500)" - if (( WIDTH < 500 )) - then - WIDTH=500 - fi - ans=$(zenity --class=OBI --list "${ZEN_ICON}" --title="$version - $dialog_name" --text="$DisplayText" --width="$WIDTH" --height=220 --column "$Hotkey" --column="$Availabledevices" "${bvar[@]}") - retval=$? - ans="${ans:0:1}" - else - ans=$(dialog \ - --backtitle "$version - $dialog_name" \ - --title "$Pleaseselectadevicewiththearrowkeys" \ - --colors --no-shadow --ok-label "$Go" --cancel-label "$Quit" --no-shadow \ - --menu "$Availabledevices" \ - 17 100 $aind "${bvar[@]}" 3>&1 1>&2 2>&3 3>&- ) - retval=$? - fi - [[ "$use_GRUB" == "TRUE" ]] && (( retval != 0 )) && echoout "$NEEDbootDEV" - [[ -n "$ans" ]] && LOGecho "list_device_dialog():$ans" - if (( retval != 0 )) - then - ans="$ans_q" - fi - if [[ "$ans" == "$answer_u" ]] - then - choice=1 - if $usbonly - then - usbonly=false - else - usbonly=true - fi - elif [[ "$ans" == "$ans_q" ]] || [[ -z "$ans" ]] || (( ans < 0 )) - then - if [[ "$use_GRUB" != "TRUE" ]] - then - clearOBI - return 1 - else - LOGecho "NO quitting now!! :D" - fi - else - choice=$((ans - 1)) - target="${adev[$choice]}" - cmdsav="${atxt[$choice]}" - fi - export target - export cmdsav - done - - return 0 -} -####################################################################### -####################################################################### -select_device(){ - ## PICK A DEVICE - list_device_dialog "$1" "$2" "TRUE" - if (( $? == 1 )) - then - return 1 - fi - -# here we go - if [[ "$source" == "/dev/zero" ]] - then - doing="$wiping\n\n" - else - doing="$installingtheoperatingsystem \Z4$obi_system\Zn\n " - [[ "$USEZENITY" == "true" ]] && doing="$installingtheoperatingsystem $obi_system" - fi - -#echo "$obi_system" "$imagefile" "$target" -#echo "$cmdsav" - cmdsav="${cmdsav/USB\:\ }" - cmdsav="${cmdsav/Name\:\ usb\-}" - cmdsav="${cmdsav/Name\:\ ata\-}" - cmdsav="${cmdsav/Dev\:}" - cmdsav="${cmdsav/Size\:}" - cmdsav=$(tr -s ' ' ' ' <<< "$cmdsav") - cmdsav=$(sed 's/ / /g' <<< "$cmdsav") - -#echo "$cmdsav" -#read -p 'stop' - LANG="$curlang" - width="600" - if [[ "$USEZENITY" == "true" ]] - then -# from mkusb - arrow=' - - - - - - - - - -' - - MSG=" - -

-
-$prgnam
-$thetargetwillbe ${doing}
-$TARGET $cmdsav
-
- $FINALWARNING $beforewipingandinstalling -
-

- -$arrow -" - - MSG="${MSG//\\Z4/}" - MSG="${MSG//\\Zn/}" - MSG="${MSG//\\n/
}" - ans=$(echo "${MSG}" | zenity --class=OBI --text-info "${ZEN_ICON}" --html --title="$version - $SelectDevice - $FINALWARNING" --width="$width" --height=330 --checkbox="$Checkthisboxifyouarereadytogo" --filename="/dev/stdin") - - else - ## USE DIALOG NOT ZENITY - warning_dialog ## make warning colors - - ans=$(dialog --cr-wrap --no-collapse --defaultno --colors --no-shadow \ ---backtitle "$version - $SelectDevice - $FINALWARNING" \ ---yesno "$prgnam $thetargetwillbe ${doing}\n$TARGET\Z4$cmdsav\Zn\n\n -\Z1\Z7 $FINALWARNING \Z1 $beforewipingandinstalling\Zn" 13 "$width" \ - 3>&1 1>&2 2>&3 3>&- ) - - normal_dialog ## return to normal colors - - fi - - ans="$?" - if [ "$ans" != "0" ] - then - clearOBI - return 1 - fi - - swapoff "$target"* 2>/dev/null - sync - - return 0 -} - -####################################################################### -####################################################################### - -general_file_select() { - -#echo $imagefile - if [[ -f "$imagefile" ]] - then - choice="$imagefile" - else - choice="$PWD/" - fi - - if $zenityplug || [[ "$USEZENITY" == "true" ]] - then - ans=$(zenity --class=OBI --file-selection --title "${ZEN_ICON}" "$version - $Selectsourcefile" \ ---filename="$choice" --file-filter=*.tar.?z ) -#--filename="$choice" --file-filter=*.{iso,img,img.?z} ) - else - ans=$(dialog --backtitle \ -"$SPACEBARSLASH" \ ---no-shadow --fselect "$choice" 7 200 3>&1 1>&2 2>&3 3>&- ) - fi - - imagefile="$ans" -# write selection or blank - LOGecho "imagefile=$imagefile in 'general_file_select'" -} - -####################################################################### -####################################################################### - -select_source() { - LANG="$curlang" - menutitle="$Findisoandimagefiles" - - if $zenityplug || [[ "$USEZENITY" == "true" ]] - then - level="$normalfiletypefilter" - menutitle="$menutitle\n\n -\Z1$Increasethesizeoftheterminalwindow\Zn" - - else - level="difficult" - menutitle="$menutitle\n -\Z1$Avoidspacesandspecialcharacters\Zn" - fi - -#while [ "$ans" != "q" ] && [ "$ans" != "" ] -#do - if [[ "$USEZENITY" == "true" ]] - then - menutitle="${menutitle/\\Z1/}" - menutitle="${menutitle/\\Zn/}" - ans=$(zenity --class=OBI --list "${ZEN_ICON}" --title="$version - $Selectsourcefile" --text="$selectactionwithletterorarrow" --column="$Hotkey" --column="$menutitle" \ -"$ans_s" "$nosearchforlinkedfiles" \ -"$ans_l" "$includeLinkedfiles" \ -"$ans_g" "$GeneralFileselector ($level)" \ -"$ans_q" " $Quit" ) -ans="${ans:0:1}" - - else - - ans=$(dialog --no-shadow --backtitle "$version - $Selectsourcefile" \ ---colors --cancel-label "$Quit" \ ---title "$selectactionwithletterorarrow" \ ---menu "$menutitle" 18 80 4 \ -"$ans_s" "$nosearchforlinkedfiles" \ -"$ans_l" "$includeLinkedfiles" \ -"$ans_g" "$GeneralFileselector ($level)" \ -"$ans_q" " $Quit" \ - 3>&1 1>&2 2>&3 3>&- ) - - fi - - case $ans in - "$ans_s")special_file_select;; - "$ans_l")special_file_select "-L";; - "$ans_g")general_file_select;; - "$ans_q")return;; - *)general_file_select;; ## default to this I guess - esac -#done - - test -f "$imagefile" - if (( $? != 0 )) - then - imagefile="" - fi - -# write selection - [[ ! -f "$selected" ]] && selected=$(selector_of_tarball_dir) - echo "$imagefile" > "$selected" - - LOGecho "select_source: imagefile=$imagefile" - - unset ans -#LANG=C -} - -####################################################################### -####################################################################### - -ch_display() { - menutitle="$Amongfilesselecteddirectory\n" - - if [[ "$USEZENITY" == "true" ]] - then - ans=$(zenity --class=OBI --list "${ZEN_ICON}" --title="$version - $Selectfiletypetodisplay" --text="$selectactionwithletterorarrow" --column="$Hotkey" --column="$menutitle" \ -"$ans_a" "$allfilessuitable" \ -"$ans_iso" "$onlyISOfiles" \ -"$ans_m" "$onlyimagefiles" \ -"$ans_q" " $Quit" ) -ans="${ans:0:1}" - - else - ans=$(dialog --no-shadow --backtitle "$version - $Selectfiletypetodisplay" \ ---colors --cancel-label "$Quit" --default-item "$1" \ ---title "$selectactionwithletterorarrow" \ ---menu "$menutitle" 18 80 4 \ -"$ans_a" "$allfilessuitable" \ -"$ans_iso" "$onlyISOfiles" \ -"$ans_m" "$onlyimagefiles" \ -"$ans_q" " $Quit" \ - 3>&1 1>&2 2>&3 3>&- ) - fi - - if [[ "$ans" == "$ans_a" ]] || [[ "$ans" == "$ans_iso" ]] || [[ "$ans" == "$ans_m" ]] - then - ch_item="$ans" - fi -} - diff -Nru obi-installer-3.3.0ubuntu0/OBI/grub-installer obi-installer-3.4.0ubuntu0/OBI/grub-installer --- obi-installer-3.3.0ubuntu0/OBI/grub-installer 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/grub-installer 2018-03-15 13:13:10.000000000 +0000 @@ -2,7 +2,10 @@ ##KVM COMMAND just for me # mkdir /tmp/host_files # mount -t 9p -o trans=virtio,version=9p2000.L /hostshare /tmp/host_files -. gettext.sh +eval_gettext(){ + echo -e "$*" +} +source gettext.sh export TEXTDOMAIN=obi-installer ########################################################### ## filesystem directory will go left of this so change accordingly if text goes right to left @@ -11,36 +14,39 @@ ## GRUB is the bootloader, this dialog shows which device the bootloader updated for updatedgrubfor=$(eval_gettext "Updated GRUB for:") installingBootloader=$(eval_gettext "Installing Bootloader") -unmountedallfilesystems=$(eval_gettext "unmounted all chroot bound filesystems") -OneButtonInstaller=$(eval_gettext "One Button Installer") unmountChroot=$(eval_gettext "Successfully unmounted chroot") NOunmountChroot=$(eval_gettext "Couldn't successfully unmount chroot") ########################################################### -## logging function ## -[[ -f "$HOME/usezenity" ]] && USEZENITY=$(cat "$HOME/usezenity") -ICONPATH="/usr/share/icons/hicolor/48x48/apps/obi-window-icon.png" + + +################################################ +## Source our handy functions!! +## make sure they are in the PATH first +OBI_SHARE_DIR="/usr/share/OBI" +if [[ -d "${OBI_SHARE_DIR}" ]] && [[ "${PATH/$OBI_SHARE_DIR}" == "${PATH}" ]] +then + PATH="${PATH}:/usr/share/OBI" + export PATH +elif [[ "${PATH/$PWD}" == "${PATH}" ]] +then + PATH="${PATH}:${PWD}" + export PATH +fi +source obi-functions || exit +################################################ + + +## global variables +[[ -z "$USEZENITY" ]] && USEZENITY="$(getZenity)" +ICONPATH="$(getIcon)" ZEN_ICON="--window-icon=$ICONPATH" -tailfile="${HOME}"/.obi-progress -echoout() { - if [[ "$USEZENITY" == "true" ]] - then - zenity --class=OBI --info --timeout=7 --title="$OneButtonInstaller" "$ZEN_ICON" --text="$*" - else - dialog --infobox "$*" 0 0 - sleep .7 - fi - echo -e "[grub-installer] $*" >> "${HOME}"/obi-installer.log +ECHO() { + echoOut "grub-installer" "$*" } -LOGecho(){ - if [[ "$USEZENITY" == "true" ]] - then - echo -e "
[grub-installer]
$*" >> "${HOME}"/obi-installer.log - else - echo -e "[grub-installer] $*" >> "${HOME}"/obi-installer.log - fi +LOG_ECHO(){ + echoLOG "grub-installer" "$*" } dest="/dev/sda" -CHROOT="/mnt" if [[ -n "$1" ]] then @@ -51,7 +57,7 @@ then CHROOT="$2" fi - +CHROOT=$(chrootDirectory "${CHROOT}") if [[ -n "$3" ]] then @@ -59,8 +65,9 @@ fi select_grub_device() { - source functions || exit ## this function is there around 439 - list_device_dialog "all" "$SelectGRUBDevice" "nope" "TRUE" "$DisplayText" + + #target=$(list_device_dialog "all" "$SelectGRUBDevice" "nope" "TRUE" "$DisplayText") + target=$(list_device_dialog "all" "$SelectGRUBDevice" "nope" "TRUE" "$DisplayText") if (( $? == 1 )) then return 1 @@ -68,7 +75,7 @@ if [[ -n "$target" ]] then dest="$target" - export dest + echo "$dest" else return 1 fi @@ -78,26 +85,32 @@ retval=1 while (( retval != 0 )) do - select_grub_device + dest=$(select_grub_device) + retval="$?" done -LOGecho " [grub-installer] Bootloader destination: $dest" +LOG_ECHO "Bootloader destination: $dest" df | grep "$CHROOT" retval="$?" if (( retval != 0 )) then - echoout "$arootfilesystemshouldbemountedonmnt$CHROOT" + ECHO "$arootfilesystemshouldbemountedonmnt$CHROOT" exit fi +chrootCommand "$CHROOT" "grub-installer" "sync" -[[ -f /etc/mtab ]] && cp /etc/mtab "$CHROOT/etc/mtab" && LOGecho " [grub-installer] Copied live CD mtab to chroot" -mount -t proc proc "$CHROOT"/proc -mount -t sysfs sys "$CHROOT"/sys -mount -o bind /dev "$CHROOT"/dev +startCHROOT "$CHROOT" "grub-installer" +retval="$?" +if (( retval != 0 )) +then + ErrorExit "grub-installer" "$retval" "Failed to start the CHROOT" +fi +##TODO: this is for systemd ONLY!!! +chrootCommand "$CHROOT" "grub-installer" "ln -s /proc/self/mounts /etc/mtab" 2> /dev/null if [[ "$USEZENITY" == "true" ]] then - chroot "$CHROOT" bash -c "echo 5 + chrootCommand "$CHROOT" "grub-installer" "echo 5 grub-install $dest echo 40 grub-install --recheck $dest @@ -107,17 +120,17 @@ sync echo 80 update-grub -echo 100" | zenity --class=OBI --progress "$ZEN_ICON" --title="$installingBootloader" --text="$installingBootloader" --width=300 --height=70 --auto-close --no-cancel +echo 100" | zenity --class=OBI --progress "$ZEN_ICON" --title="$installingBootloader" --text="$installingBootloader" --width=300 --height=70 --auto-close --no-cancel 2> /dev/null else - chroot "$CHROOT" bash -c "grub-install $dest && + chrootCommand "$CHROOT" "grub-installer" "grub-install $dest && grub-install --recheck $dest && -update-grub && sync && update-grub" && LOGecho " [grub-installer] $updatedgrubfor $dest" +update-grub && sync && update-grub" && LOG_ECHO "$updatedgrubfor $dest" fi ## CLEAN UP -umount "$CHROOT"/{proc,sys,dev} && LOGecho " [grub-installer] $unmountedallfilesystems" -chroot "${CHROOT}" bash -c "pgrep dbus-daemon > /dbus.pid" -chroot "${CHROOT}" bash -c "pgrep dbus-launch >> /dbus.pid" +endCHROOT "$CHROOT" "grub-installer" +chrootCommand "$CHROOT" "grub-installer" "pgrep dbus-daemon > /dbus.pid" +chrootCommand "$CHROOT" "grub-installer" "pgrep dbus-launch >> /dbus.pid" if [[ -f "${CHROOT}/dbus.pid" ]] then @@ -128,46 +141,48 @@ [[ -f "${CHROOT}/dbus.pid" ]] && rm "${CHROOT}/dbus.pid" if [[ -n "${pidCAT[*]}" ]] then - LOGecho "dbus pids in $CHROOT ${pidCAT[*]}" + LOG_ECHO "dbus pids in $CHROOT ${pidCAT[*]}" for i in "${pidCAT[@]}" do - chroot "${CHROOT}" bash -c "kill -9 $i" && LOGecho " [grub-installer] killed $i for $CHROOT" + chrootCommand "$CHROOT" "grub-installer" "kill -9 $i" && LOG_ECHO "killed $i for $CHROOT" done fi IFS="$OIFS" fi -chroot "${CHROOT}" sync +chrootCommand "$CHROOT" "grub-installer" "sync" umount --force "${CHROOT}" retval=$? ## CHECK FOR ERRORS if (( retval == 0 )) then - LOGecho " [grub-installer] $unmountChroot" + LOG_ECHO "$unmountChroot" else + unset MSG ## TRY TO FIX ISSUES fUSER=($(fuser "$CHROOT")) LSOF=$(lsof +d "$CHROOT") [[ -n "${fUSER[*]}" ]] && MSG="fuser info:\n${fUSER[*]}\n" [[ -n "$LSOF" ]] && MSG="${MSG}lsof info:$LSOF\n" [[ "$USEZENITY" == "true" ]] && [[ -n "$MSG" ]] && MSG="${MSG//\\n/
}" - LOGecho " [grub-installer] ${MSG}$NOunmountChroot" + [[ -n "$MSG" ]] && LOG_ECHO "${MSG}" for i in "${fUSER[@]}" do - chroot "$CHROOT" bash -c "kill -9 $i" && LOGecho "kill -9 $i" + chrootCommand "$CHROOT" "grub-installer" "kill -9 $i" && LOG_ECHO "kill -9 $i" done umount --force "${CHROOT}" retval=$? if (( retval == 0 )) then - LOGecho "$unmountChroot" + LOG_ECHO "$unmountChroot" else [[ -n "${fUSER[*]}" ]] && MSG="fuser info:\n${fUSER[*]}\n" [[ -n "$LSOF" ]] && MSG="${MSG}lsof info:$LSOF\n" [[ "$USEZENITY" == "true" ]] && [[ -n "$MSG" ]] && MSG="${MSG//\\n/
}" - LOGecho " [grub-installer] ${MSG}$NOunmountChroot" + [[ -n "$MSG" ]] && LOG_ECHO "${MSG} $NOunmountChroot" + [[ -z "$MSG" ]] && LOG_ECHO "$NOunmountChroot" fi fi -echo "95 #OBI progress">> "$tailfile" +progressTail "85" diff -Nru obi-installer-3.3.0ubuntu0/OBI/hardware-search obi-installer-3.4.0ubuntu0/OBI/hardware-search --- obi-installer-3.3.0ubuntu0/OBI/hardware-search 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/hardware-search 2018-03-15 13:13:10.000000000 +0000 @@ -2,74 +2,76 @@ [[ $(whoami) != "root" ]] && exit 1 LOG="$HOME/hardware-search.log" -date -I > "$LOG" ARGS=($@) ARGSiter=0 if [[ -n "${ARGS[*]}" ]] then - ARGSiter="${#ARGS[@]}" - ARGSiter=$(( ARGSiter )) + ARGSiter="${#ARGS[@]}" + ARGSiter=$(( ARGSiter )) fi echo "0" find_firmware(){ - LOOKFOR="$1" - echo "Look for $LOOKFOR" >> "$LOG" - ITEM=$(apt-file search -i --package-only /lib/firmware/"$LOOKFOR") - retval=$? - if (( retval != 0 )) - then - apt-file update - fi - [[ -z "$ITEM" ]] && return - if [[ -d /firmware ]] - then - for i in /firmware/**.deb - do - if [[ "${i/$ITEM}" != "$i" ]] - then - echo "Installing $i" >> "$LOG" - dpkg -i "$i" - retval=$? - (( retval != 0 )) && apt-get -f install - fi - done - else - apt-get install "$i" - retval=$? - (( retval != 0 )) && echo "DIDN'T install $i" >> "$LOG" - fi + LOOKFOR="$1" + echo "Look for $LOOKFOR" >> "$LOG" + ITEM=$(apt-file search -i --package-only /lib/firmware/"$LOOKFOR") + retval=$? + if (( retval != 0 )) + then + apt-file update + fi + [[ -z "$ITEM" ]] && return + if [[ -d /firmware ]] + then + for i in /firmware/**.deb + do + if [[ "${i/$ITEM}" != "$i" ]] + then + echo "Installing $i" >> "$LOG" + dpkg -i "$i" + retval=$? + (( retval != 0 )) && apt-get -f install + fi + done + else + apt-get install "$i" + retval=$? + (( retval != 0 )) && echo "DIDN'T install $i" >> "$LOG" + fi } find_missing_firmware(){ - OIFS="$IFS" - IFS=" + OIFS="$IFS" + local IFS=" " - LIST=($(dmesg | grep -i firmware)) - num="${#LIST[@]}" - num=$(( num )) - (( ARGSiter != 0 )) && num=$(( num + ARGSiter )) - increment=$(( 100 / num )) - iter=0 - echo "$iter" - for firmware in "${LIST[@]}" - do - LISTitem="${firmware/*] }" - LISTitem="${LISTitem/ *}" - [[ -n "$LISTitem" ]] && find_firmware "$LISTitem" - iter=$(( iter + increment )) - echo "$iter" - done - IFS="$OIFS" - if [[ -n "${ARGS[*]}" ]] - then - for input in "${ARGS[@]}" - do - [[ -n "$input" ]] && find_firmware "$input" - iter=$(( iter + increment )) - echo "$iter" - done - fi - [[ -z "${ARGS[*]}" ]] && [[ -z "${LIST[*]}" ]] && echo "No dmesg errors found">> "$LOG" + LIST=($(dmesg | grep -i firmware)) + num="${#LIST[@]}" + num=$(( num )) + (( ARGSiter != 0 )) && num=$(( num + ARGSiter )) + (( num == 0 )) && return + [[ -z "$num" ]] && return + date -I > "$LOG" + increment=$(( 100 / num )) + iter=0 + echo "$iter" + for firmware in "${LIST[@]}" + do + LISTitem="${firmware/*] }" + LISTitem="${LISTitem/ *}" + [[ -n "$LISTitem" ]] && find_firmware "$LISTitem" + iter=$(( iter + increment )) + echo "$iter" + done + local IFS="$OIFS" + if [[ -n "${ARGS[*]}" ]] + then + for input in "${ARGS[@]}" + do + [[ -n "$input" ]] && find_firmware "$input" + iter=$(( iter + increment )) + echo "$iter" + done + fi + [[ -z "${ARGS[*]}" ]] && [[ -z "${LIST[*]}" ]] && echo "No dmesg errors found">> "$LOG" } find_missing_firmware echo "100" diff -Nru obi-installer-3.3.0ubuntu0/OBI/hw-progress obi-installer-3.4.0ubuntu0/OBI/hw-progress --- obi-installer-3.3.0ubuntu0/OBI/hw-progress 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/hw-progress 2018-03-15 13:13:10.000000000 +0000 @@ -4,11 +4,36 @@ ########################################################### hwfirmdetect=$(eval_gettext "Hardware firmware detector") ChooseDirectoryWithFirmwareDebs=$(eval_gettext "Please Choose a Directory With Firmware Deb files") +OneButtonInstaller=$(eval_gettext "One Button Installer") ########################################################### -[[ -f "$HOME/usezenity" ]] && USEZENITY=$(< "$HOME/usezenity") -ICONPATH="/usr/share/icons/hicolor/48x48/apps/obi-window-icon.png" +################################################ +## Source our handy functions!! +## make sure they are in the PATH first +OBI_SHARE_DIR="/usr/share/OBI" +if [[ -d "${OBI_SHARE_DIR}" ]] && [[ "${PATH/$OBI_SHARE_DIR}" == "${PATH}" ]] +then + PATH="${PATH}:/usr/share/OBI" + export PATH +elif [[ "${PATH/$PWD}" == "${PATH}" ]] +then + PATH="${PATH}:${PWD}" + export PATH +fi +source obi-functions || exit +################################################ +ECHO() { + echoOut "hw-progress" "$*" +} +LOG_ECHO(){ + echoLOG "hw-progress" "$*" +} + +## global variables +[[ -z "$USEZENITY" ]] && USEZENITY="$(getZenity)" +ICONPATH="$(getIcon)" ZEN_ICON="--window-icon=$ICONPATH" + CHROOT="/mnt" if [[ -n "$1" ]] then @@ -16,143 +41,119 @@ fi firmdir="/firmware/" errorout(){ - if [[ "$USEZENITY" == "true" ]] - then - zenity --class=OBI --info --timeout=7 --title="$OneButtonInstaller" "$ZEN_ICON" --text="[ERROR]::$*" - else - dialog --infobox "[ERROR]::$*" 0 0 - sleep .7 - fi - echo -e "[ERROR]::[hw-progress] $*" >> "${HOME}"/obi-installer.log - exit 1 -} -echoout(){ - if [[ "$USEZENITY" == "true" ]] - then - zenity --class=OBI --info --timeout=7 --title="$OneButtonInstaller" "$ZEN_ICON" --text="$*" - else - dialog --infobox "$*" 0 0 - sleep .7 - fi - echo -e "[hw-progress] $*" >> "${HOME}"/obi-installer.log -} - -LOGGERecho(){ - if [[ "$USEZENITY" == "true" ]] - then - echo -e "
[hw-progress]
$*" >> "${HOME}"/obi-installer.log - else - echo -e "[hw-progress] $*" >> "${HOME}"/obi-installer.log - fi -} -testTRUE(){ - retval="$1" - MSG="$2" - if (( retval == 0 )) - then - LOGGERecho "$MSG" - else - LOGGERecho "[WARNING FAILURE]::$MSG" - fi + ECHO "::[ERROR] $*" >> "${HOME}"/obi-installer.log + return 1 +} +TEST_TRUE(){ + retval="$1" + shift + MSG="$*" + TestTrue "$retval" "hw-progress" "${MSG}" } cleanUPhwprogress(){ - [[ -z "$firmdir" ]] && return 1 - rm -Rf "$CHROOT/$firmdir" - testTRUE $? "remove directory $firmdir from $CHROOT" - umount "$CHROOT"/{proc,sys,dev} - testTRUE $? "umount $CHROOT/{proc,sys,dev}" + thisCHROOT="$1" + firmwareDIR="$2" + [[ -z "${thisCHROOT}" ]] && return 1 + if [[ -n "$firmwareDIR" ]] + then + rm -Rf "${thisCHROOT:?}/$firmdir" + TEST_TRUE $? "remove directory $firmdir from $thisCHROOT" + fi + endCHROOT "${thisCHROOT}" "hw-progress" } find_missing_firmware(){ - OIFS="$IFS" - IFS=" + OIFS="$IFS" + local IFS=" " - LIST=($(dmesg | grep -i firmware)) - for firmware in "${LIST[@]}" - do - LISTitem="${firmware/*] }" - LISTitem="${LISTitem/ *}" - LISTitem="${LISTitem/*Firmware*}" - LISTitem="${LISTitem/:}" - [[ -n "${LISTitem}" ]] && LOGGERecho "${LISTitem}" && echo "${LISTitem}" - done - IFS="$OIFS" + LIST=($(dmesg | grep -i firmware)) + for firmware in "${LIST[@]}" + do + LISTitem="${firmware/*] }" + LISTitem="${LISTitem/ *}" + LISTitem="${LISTitem/*Firmware*}" + LISTitem="${LISTitem/:}" + [[ -n "${LISTitem}" ]] && LOG_ECHO "${LISTitem}" && echo "${LISTitem}" + done + IFS="$OIFS" } chooseDIR(){ - if [[ "$USEZENITY" == "true" ]] - then - ans=$(zenity --class=OBI --title="$ChooseDirectoryWithFirmwareDebs" "$ZEN_ICON" --file-selection) - else - ans=$(dialog --backtitle "$OneButtonInstaller" --title "$ChooseDirectoryWithFirmwareDebs" --output-fd 1 --fselect "$HOME" 17 100) - fi - for i in "$ans"**.deb - do - if [[ -f "${i}" ]] - then - [[ "${i/.deb}" != "$i" ]] && winner="$ans" - fi - done - echo "$winner" + if [[ "$USEZENITY" == "true" ]] + then + ans=$(zenity --class=OBI --title="$ChooseDirectoryWithFirmwareDebs" "$ZEN_ICON" --file-selection 2>/dev/null) + else + ans=$(dialog --backtitle "$OneButtonInstaller" --title "$ChooseDirectoryWithFirmwareDebs" --output-fd 1 --fselect "$HOME" 17 100) + fi + for i in "$ans"**.deb + do + if [[ -f "${i}" ]] + then + [[ "${i/.deb}" != "$i" ]] && winner="$ans" + fi + done + echo "$winner" } -makeITso(){ -curlang="$LANG" -LC_ALL=C -LANG=C -source functions -[[ -z "$dpath" ]] && dpath=$(getDpath) -HWsearch="$dpath/hardware-search" -if [[ ! -f "$HWsearch" ]] -then - errorout "$HWsearch does not exist" -else - [[ -x "$HWsearch" ]] || chmod +x "$HWsearch" -fi -cp "$HWsearch" "${CHROOT}/usr/bin" -retval=$? -if (( retval == 0 )) -then - COMMAND="hardware-search" -else - errorout "Did not copy $HWsearch to ${CHROOT}/usr/bin" -fi - -if [[ -d "$firmdir" ]] -then - cp -R "$firmdir" "${CHROOT}" -else - firmdir=$(chooseDIR) - LOGGERecho "$firmdir was chosen" - cp -R "$firmdir" "${CHROOT}" +makeITso(){ + myCHROOT="$1" + curlang="$LANG" + LC_ALL=C + LANG=C + + [[ -z "$dpath" ]] && dpath="$(getDpath)" + HWsearch="$dpath/hardware-search" + if [[ ! -f "$HWsearch" ]] + then + errorout "$HWsearch does not exist" + return $? + else + [[ -x "$HWsearch" ]] || chmod +x "$HWsearch" + fi + cp "$HWsearch" "${myCHROOT}/usr/bin" + retval=$? + if (( retval == 0 )) + then + COMMAND="hardware-search" + else + errorout "Did not copy $HWsearch to ${myCHROOT}/usr/bin" + return $? + fi + + + if [[ -d "$firmdir" ]] + then + cp -R "$firmdir" "${myCHROOT}" + else + firmdir="$(chooseDIR)" + LOG_ECHO "$firmdir was chosen" + cp -R "$firmdir" "${myCHROOT}" # umount "$firmdir" -fi -[[ -z $firmdir ]] && exit 1 -LIST=($(find_missing_firmware)) -[[ -n "${LIST[*]}" ]] && COMMAND="$COMMAND ${LIST[@]}" -LOGGERecho " hw-progress $COMMAND" -mount -t proc proc "$CHROOT"/proc -testTRUE $? "mount -t proc proc $CHROOT/proc" -mount -t sysfs sys "$CHROOT"/sys -testTRUE $? "mount -t sysfs sys $CHROOT/sys" -mount -o bind /dev "$CHROOT"/dev -testTRUE $? "mount -o bind /dev $CHROOT/dev" -## use some system files to get internet -cp /etc/hosts "${CHROOT}"/etc/hosts -testTRUE $? "cp /etc/hosts" -cp /etc/resolv.conf "${CHROOT}"/etc/resolv.conf -testTRUE $? "cp /etc/resolv.conf" -if [ "$USEZENITY" == "true" ] -then - chroot "$CHROOT" bash -c "$COMMAND" | zenity --class=OBI --progress "$ZEN_ICON" --title="$hwfirmdetect" --text="$hwfirmdetect" --width=300 --height=70 --auto-close --no-cancel - testTRUE $? "chroot $CHROOT bash -c $COMMAND" -else - chroot "$CHROOT" bash -c "$COMMAND" | pv - testTRUE $? "chroot $CHROOT bash -c $COMMAND" -fi -cleanUPhwprogress "${thisLIST[@]}" -hwLOGGe="$CHROOT/root/hardware-search.log" -[[ -f "$hwLOGGe" ]] && LOGGERecho $(cat "$hwLOGGe") -[[ ! -f "$hwLOGGe" ]] && LOGGERecho "$hwLOGGe doesn't exist" + fi + [[ -z $firmdir ]] && exit 1 + LIST=($(find_missing_firmware)) + [[ -n "${LIST[*]}" ]] && COMMAND="$COMMAND ${LIST[*]}" + LOG_ECHO "$COMMAND" + startCHROOT "${myCHROOT}" "hw-progress" + retval="$?" + if (( retval != 0 )) + then + errorout "hw-progress" "$retval" "Failed to start the CHROOT" + return $? + fi + if [[ "$USEZENITY" == "true" ]] + then + chrootCommand "$myCHROOT" "hw-progress" "$COMMAND" | zenity --class=OBI --progress "$ZEN_ICON" --title="$hwfirmdetect" --text="$hwfirmdetect" --width=300 --height=70 --auto-close --no-cancel 2>/dev/null + TEST_TRUE $? "chroot $myCHROOT bash -c ${COMMAND}" + else + chrootCommand "$myCHROOT" "hw-progress" "$COMMAND" | pv + TEST_TRUE $? "chroot $myCHROOT bash -c $COMMAND" + fi + cleanUPhwprogress "$myCHROOT" "$firmdir" + TEST_TRUE $? "cleanUPhwprogress $myCHROOT $firmdir" + hwLOGGe="$myCHROOT/root/hardware-search.log" + [[ -f "$hwLOGGe" ]] && [[ -n "$( < $hwLOGGe)" ]] && LOG_ECHO "LOG:\n$( < $hwLOGGe)" + [[ ! -f "$hwLOGGe" ]] && LOG_ECHO "$hwLOGGe doesn't exist, so you probably don't need firmware installed" + LANG="$curlang" } -makeITso +makeITso "$CHROOT" diff -Nru obi-installer-3.3.0ubuntu0/OBI/init-dialog obi-installer-3.4.0ubuntu0/OBI/init-dialog --- obi-installer-3.3.0ubuntu0/OBI/init-dialog 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/init-dialog 2018-03-15 13:13:10.000000000 +0000 @@ -1,15 +1,13 @@ #!/bin/bash -function init_dialog { - +init_dialog(){ + FILEname="${HOME}"/.dialogrc # create the file for run-time configuration, with text names for colours - -dialog --create-rc "${HOME}"/.dialogrc + dialog --create-rc "${FILEname}" # initiate colours - -sed -i 's/use_colors.*/use_colors = ON/' "${HOME}"/.dialogrc -sed -i 's/screen_color =.*/screen_color = (CYAN,BLUE,ON)/' "${HOME}"/.dialogrc + sed -i 's/use_colors.*/use_colors = ON/' "${FILEname}" + sed -i 's/screen_color =.*/screen_color = (CYAN,BLUE,ON)/' "${FILEname}" } init_dialog diff -Nru obi-installer-3.3.0ubuntu0/OBI/install-pae obi-installer-3.4.0ubuntu0/OBI/install-pae --- obi-installer-3.3.0ubuntu0/OBI/install-pae 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/install-pae 2018-03-15 13:13:10.000000000 +0000 @@ -9,113 +9,114 @@ # Proverbs 30:25 # # KJV (Public Domain) # # # -# user-config copyright Israel 2015 # -# MIT License # +# install-pae # +# copyright Israel 2015-2018++ # +# MIT License # # # ############################################################## if [[ -n "$1" ]] then - USERNAME="$1" + USERNAME="$1" else - exit + exit fi LOG="/home/$USERNAME/pae-kernel-install.log" TAILFILE="/home/$USERNAME/pae.tail" date -I > "$LOG" logECHO(){ - echo "$*" >> "$LOG" + echo "$*" >> "$LOG" } echo "10 #pae" >> "$TAILFILE" DISTRO=$(bash -c "uname -v") logECHO "Kernel version in installed base is $DISTRO" if [[ "${DISTRO/Ubuntu}" != "$DISTRO" ]] then - RELEASE=$(bash -c "cat /etc/issue | cut -d ' ' -f2 | tr '\n' ' ' | tr '\l' ' '") + RELEASE=$(bash -c "cat /etc/issue | cut -d ' ' -f2 | tr '\n' ' ' | tr '\l' ' '") else - RELEASE=$(bash -c "cat /etc/issue | cut -d ' ' -f3 | tr '\n' ' ' | tr '\l' ' '") + RELEASE=$(bash -c "cat /etc/issue | cut -d ' ' -f3 | tr '\n' ' ' | tr '\l' ' '") fi logECHO "Using $RELEASE" KERNEL="" echo "15 #pae" >> "$TAILFILE" [[ -z "$RELEASE" ]] && logECHO "couldn't figure out your distro... sorry no PAE kernel is available" && echo "100 #pae" >> "$TAILFILE" && exit -mount none -t proc /proc && -mount none -t sysfs /sys && -mount none -t devpts /dev/pts && export HOME="/home/$USERNAME" && export USER="$USERNAME" && export LC_ALL=C && logECHO " mounted all the temporary things for this chroot successfully" -echo "20 #pae" >> "$TAILFILE" -dbus-uuidgen --ensure -dbus-uuidgen > /var/lib/dbus/machine-id && -dpkg-divert --local --rename --add /sbin/initctl && -ln -s /bin/true /sbin/initctl echo "25 #pae" >> "$TAILFILE" apt-get update quitFun(){ ##Close down the Chroot - rm /sbin/initctl && logECHO "remove /sbin/initctl" - dpkg-divert --rename --remove /sbin/initctl && logECHO "dpkg-divert --rename --remove /sbin/initctl" - rm /etc/resolv.conf && logECHO "rm /etc/resolv.conf" - umount -lf /proc && - umount -lf /sys && - umount -lf /dev/pts && logECHO "unmounted all the temporary things for the chroot successfully" - echo "100 #pae" >> "$TAILFILE" - exit + rm /sbin/initctl && logECHO "remove /sbin/initctl" + dpkg-divert --rename --remove /sbin/initctl && logECHO "dpkg-divert --rename --remove /sbin/initctl" + rm /etc/resolv.conf && logECHO "rm /etc/resolv.conf" + umount -lf /proc && + umount -lf /sys && + umount -lf /dev/pts && logECHO "unmounted all the temporary things for the chroot successfully" + echo "100 #pae" >> "$TAILFILE" + exit } ubuntuBase(){ - RELEASE=${RELEASE/ *} - MAJOR=${RELEASE/.*} - MINOR=${RELEASE/*.} - if [[ "$MAJOR" == "12" ]] - then - if [[ "$MINOR" == "04" ]] - then - logECHO "Ubuntu 12.04" - fi - elif [[ "$MAJOR" == "14" ]] - then - if [[ "$MINOR" == "04" ]] - then - logECHO "Ubuntu 14.04" - fi - elif [[ "$MAJOR" == "16" ]] - then - if [[ "$MINOR" == "04" ]] - then - logECHO "Ubuntu 16.04" - fi - ##TODO: does this work? - KERNEL=(linux-generic linux-image-generic linux-headers-generic) - else - logECHO "not sure what You are using.... Must abort" - quitFun - fi - echo "30 #pae" >> "$TAILFILE" + RELEASE=${RELEASE/ *} + MAJOR=${RELEASE/.*} + MINOR=${RELEASE/*.} + KERNEL=(linux-generic linux-image-generic linux-headers-generic) + case $MAJOR in + "12") + if [[ "$MINOR" == "04" ]] + then + logECHO "Ubuntu $MAJOR.$MINOR" + fi + ;; + "14") + if [[ "$MINOR" == "04" ]] + then + logECHO "Ubuntu $MAJOR.$MINOR" + fi + ;; + "16") + if [[ "$MINOR" == "04" ]] + then + logECHO "Ubuntu $MAJOR.$MINOR" + fi + ;; + "18") + if [[ "$MINOR" == "04" ]] + then + logECHO "Ubuntu $MAJOR.$MINOR" + fi + ;; + *) + unset KERNEL + logECHO "not sure what You are using.... Must abort" + quitFun + ;; + esac + echo "30 #pae" >> "$TAILFILE" } debianBase(){ #assume Debian - if [[ "$RELEASE" == "8" ]] - then - logECHO "Debian Jessie 8" + if [[ "$RELEASE" == "8" ]] + then + logECHO "Debian Jessie 8" #Jessie - KERNEL=(linux-base linux-image-686-pae linux-headers-686-pae) - else - logECHO "Debian Release=$RELEASE" + KERNEL=(linux-base linux-image-686-pae linux-headers-686-pae) + else + logECHO "Debian Release=$RELEASE" ## not sure what else to do yet... placeholder for the stuff - KERNEL=(linux-base linux-image-686-pae linux-headers-686-pae) - fi - echo "30 #pae" >> "$TAILFILE" + KERNEL=(linux-base linux-image-686-pae linux-headers-686-pae) + fi + echo "30 #pae" >> "$TAILFILE" } if [[ "${DISTRO/Ubuntu}" != "${DISTRO}" ]] then - ubuntuBase + ubuntuBase elif [[ "${DISTRO/Debian}" != "${DISTRO}" ]] then - debianBase + debianBase else - logECHO "Uh... no idea what Distribution you are using. Please report the base is using kernel version: $DISTRO, along with any other helpful information, including this file." - quitFun + logECHO "Uh... no idea what Distribution you are using. Please report the base is using kernel version: $DISTRO, along with any other helpful information, including this file." + quitFun fi [[ -z "${KERNEL[*]}" ]] && quitFun aptCACHE=$(apt-cache policy "${KERNEL[@]}" 2>&1) @@ -125,9 +126,9 @@ thisNum=45 for i in "${KERNEL[@]}" do - apt-get install -y "$i" && logECHO "Installed $i" - echo "$thisNum #pae" >> "$TAILFILE" - thisNum=$(( thisNum + 10 )) + apt-get install -y "$i" && logECHO "Installed $i" + echo "$thisNum #pae" >> "$TAILFILE" + thisNum=$(( thisNum + 10 )) done echo "75 #pae" >> "$TAILFILE" [[ -n "$(which update-initramfs)" ]] && update-initramfs -u @@ -135,4 +136,3 @@ apt-get autoremove && apt-get autoclean && logECHO "cleaned up" rm -rf /tmp/* echo "95 #pae" >> "$TAILFILE" -quitFun diff -Nru obi-installer-3.3.0ubuntu0/OBI/keyboard-switcher obi-installer-3.4.0ubuntu0/OBI/keyboard-switcher --- obi-installer-3.3.0ubuntu0/OBI/keyboard-switcher 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/keyboard-switcher 2018-03-15 13:13:10.000000000 +0000 @@ -33,15 +33,16 @@ source gettext.sh export TEXTDOMAIN=obi-installer ############################################################################# -SelectLayout=$(eval_gettext "Select Layout") -Layout=$(eval_gettext "Layout") +SelectLayout=$(eval_gettext "Select Keyboard Layout") +Layout=$(eval_gettext "Keyboard Layout") Description=$(eval_gettext "Description") UseThis=$(eval_gettext "Use This:") -Model=$(eval_gettext "Model") -SelectModel=$(eval_gettext "Select Model (if unsure use pc105)") -SelectVariant=$(eval_gettext "Select Variant (this is optional)") -Variant=$(eval_gettext "Variant") +Model=$(eval_gettext "Keyboard Model") +SelectModel=$(eval_gettext "Select Keyboard Model (if unsure use pc105)") +SelectVariant=$(eval_gettext "Select Keyboard Variant (this is optional)") +Variant=$(eval_gettext "Keyboard Variant") Doyouwanttosaveyourchoices=$(eval_gettext "Do you want to save your choices?") +NoNe=$(eval_gettext "None") ############################################################################# usage(){ bold=$(tput bold) @@ -64,7 +65,7 @@ exit 0 } KBDfile="/usr/share/X11/xkb/rules/xorg.lst" -LOCALEctlEXISTS="$(which localectl)" +#LOCALEctlEXISTS="$(which localectl)" XKBMODEL="pc105" XKBLAYOUT="us" XKBVARIANT="" @@ -74,16 +75,15 @@ [[ -f "$HOME/usezenity" ]] && USEZENITY=$( < "$HOME/usezenity") read_file(){ - thing="$1" + HEADER="$1" FILE="$2" - HEADER="$thing" unset GOAHEAD while read LINE || [[ -n "$LINE" ]] do case $LINE in *"!"*) - if [[ "${LINE/$thing}" != "$LINE" ]] + if [[ "${LINE/$HEADER}" != "$LINE" ]] then GOAHEAD="true" else @@ -111,17 +111,19 @@ COLuMN="$3" CoLumn2="$4" LIST=( $(read_file "$ThiNgie" "$KBDfile") ) + [[ "$ThiNgie" == "variant" ]] && LIST=("$NoNe" "${LIST[@]}") retval=0 if [[ "$USEZENITY" == "true" ]] then - ans=$(zenity --list --height=400 --width=300 --text="$TITLE" --title="$TITLE" --column="$COLuMN" --column="$CoLumn2" ${LIST[@]} 2>/dev/null) + ans=$(zenity --list --height=400 --width=300 --text="$TITLE" --title="$TITLE" --column="$COLuMN" --column="$CoLumn2" "${LIST[@]}" 2>/dev/null) retval=$? else - ans=$(dialog --no-shadow --backtitle "$TITLE" --title "$TITLE" --wmclass "OBI" --menu "$TITLE" 19 76 12 ${LIST[@]} 3>&1 1>&2 2>&3 3>&-) + [[ "$ThiNgie" == "variant" ]] && LIST=("$NoNe" "${LIST[@]}") + ans=$(dialog --no-shadow --backtitle "$TITLE" --title "$TITLE" --wmclass "OBI" --menu "$TITLE" 19 76 12 "${LIST[@]}" 3>&1 1>&2 2>&3 3>&-) retval="$?" fi - (( $retval != 0 )) && return "$retval" - echo $ans + (( retval != 0 )) && return "$retval" + echo "$ans" } list_layout(){ list_thingie "layout" "$SelectLayout" "$Layout" "$Description" @@ -154,16 +156,20 @@ MoDeL=$(list_models) || return 1 [[ -n "$MoDeL" ]] && use_this "$MoDeL" || return 1 echo "$MoDeL" + return 0 } get_layout(){ LaYoUt=$(list_layout) || return 1 [[ -n "$LaYoUt" ]] && use_this "$LaYoUt" || return 1 echo "$LaYoUt" + return 0 } get_variant(){ VaRiAnT=$(list_variants) || return 1 + [[ "$VaRiAnT" == "$NoNe" ]] && return 0 [[ -n "$VaRiAnT" ]] && use_this "$VaRiAnT" echo "$VaRiAnT" + return 0 } main(){ [[ "$(whoami)" != "root" ]] && usage diff -Nru obi-installer-3.3.0ubuntu0/OBI/labelfix obi-installer-3.4.0ubuntu0/OBI/labelfix --- obi-installer-3.3.0ubuntu0/OBI/labelfix 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/labelfix 2018-03-15 13:13:10.000000000 +0000 @@ -16,15 +16,15 @@ trunc=${label:0:16} if [[ "$trunc" != "$label" ]] then - label=${label//_} - label=${label//-} - label=${label//.} - trunc=${label:0:16} + label=${label//_} + label=${label//-} + label=${label//.} + trunc=${label:0:16} fi if [[ "$trunc" != "$label" ]] then - label=${label/buntu/b} - trunc=${label:0:16} + label=${label/buntu/b} + trunc=${label:0:16} fi trunc=${label:0:16} #LOGecho "[labelfix]$label\t$i\n$trunc" diff -Nru obi-installer-3.3.0ubuntu0/OBI/list_drives obi-installer-3.4.0ubuntu0/OBI/list_drives --- obi-installer-3.3.0ubuntu0/OBI/list_drives 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/list_drives 2018-03-15 13:13:10.000000000 +0000 @@ -1,123 +1,120 @@ #!/bin/bash -. gettext.sh -export TEXTDOMAIN=obi-installer -OneButtonInstaller=$(eval_gettext "One Button Installer") -[[ -f "$HOME/usezenity" ]] && USEZENITY=$(cat "$HOME/usezenity") -ICONPATH="/usr/share/icons/hicolor/48x48/apps/obi-window-icon.png" -ZEN_ICON="--window-icon=$ICONPATH" -echoout() { - if [[ "$USEZENITY" == "true" ]] - then - zenity --class=OBI --info --timeout=7 --title="$OneButtonInstaller" "$ZEN_ICON" --text="$*" - echo -e "
[list_drives]
$*" >> "${HOME}"/obi-installer.log - else - dialog --infobox "$*" 0 0 - sleep .7 - echo -e "[list_drives] $*" >> "${HOME}"/obi-installer.log - fi -} -LOGecho(){ - if [[ "$USEZENITY" == "true" ]] - then - echo -e "
[list_drives]
$*" >> "${HOME}"/obi-installer.log - else - echo -e "[list_drives] $*" >> "${HOME}"/obi-installer.log - fi + +################################################ +## Source our handy functions!! +## make sure they are in the PATH first +OBI_SHARE_DIR="/usr/share/OBI" +if [[ -d "${OBI_SHARE_DIR}" ]] && [[ "${PATH/$OBI_SHARE_DIR}" == "${PATH}" ]] +then + PATH="${PATH}:/usr/share/OBI" + export PATH +elif [[ "${PATH/$PWD}" == "${PATH}" ]] +then + PATH="${PATH}:${PWD}" + export PATH +fi +source obi-functions >/dev/null || exit +################################################ + +LOG_ECHO(){ + echoLOG "list_drives" "$*" } + ##TODO: RENAME variables so they can be understood easily [[ -n "$1" ]] && ARGS="$1" # usb only if [[ "${ARGS,,}" == "true" ]] then - switch="${ARGS,,}" - LOGecho "USB only" + switch="${ARGS,,}" + LOG_ECHO "USB only" fi cnt1=0 cnt2=0 tmpfil=$(mktemp) + ls -l /dev/disk/by-id| grep "[a-z]$"|tr -s ' ' ' '|cut -d ' ' -f 9,11 \ |sort -k2|grep -e \^a -e \^u|sed 's#../..#/dev#' > "$tmpfil" while read name device do - cnt1=$((cnt1 + 1)) - nam1[$cnt1]="${name%_*}" - nam1[$cnt1]=${nam1[$cnt1]:0:36} - dev1[$cnt1]="$device" + cnt1=$((cnt1 + 1)) + nam1[$cnt1]="${name%_*}" + nam1[$cnt1]=${nam1[$cnt1]:0:36} + dev1[$cnt1]="$device" done < "$tmpfil" lsblk -db|grep disk|tr -s ' ' ' '| cut -d ' ' -f1-4 |sort > "$tmpfil" while read device dum1 dum2 bytesize do - cnt2=$((cnt2 + 1)) - dev2[$cnt2]="$device" - mbsize=$(((bytesize+500000)/1000000)) - gbsize=$(((bytesize+500000000)/1000000000)) - if (( mbsize < 32000 )) - then - prsize[$cnt2]="${mbsize}MB" - else - prsize[$cnt2]="${gbsize}GB" - fi - device[$cnt2]="/dev/$device" + cnt2=$((cnt2 + 1)) + dev2[$cnt2]="$device" + mbsize=$(((bytesize+500000)/1000000)) + gbsize=$(((bytesize+500000000)/1000000000)) + if (( mbsize < 32000 )) + then + prsize[$cnt2]="${mbsize}MB" + else + prsize[$cnt2]="${gbsize}GB" + fi + device[$cnt2]="/dev/$device" done < "$tmpfil" rm "$tmpfil" if (( cnt1 >= cnt2 )) then - count=$cnt1 + count=$cnt1 else - count=$cnt2 + count=$cnt2 fi strsize=0 for (( i=1; i<=count ; i++ )) do - testnam1=${#nam1[$i]} - if (( testnam1 > strsize )) - then - strsize=${#nam1[$i]} - fi + testnam1=${#nam1[$i]} + if (( testnam1 > strsize )) + then + strsize=${#nam1[$i]} + fi done for (( i=1; i<=count ; i++ )) do - testnam1="${#nam1[$i]}" - addsize=$((strsize - testnam1)) - blank=' ' - spacer="${blank:0:$addsize}" - printsize= - for (( j=1; j<=count ; j++ )) - do + testnam1="${#nam1[$i]}" + addsize=$((strsize - testnam1)) + blank=' ' + spacer="${blank:0:$addsize}" + printsize= + for (( j=1; j<=count ; j++ )) + do # echo "${dev1[$i]} ?==? /dev/${dev2[$j]}" - if [[ "${dev1[$i]}" == "/dev/${dev2[$j]}" ]] - then - printsize="${prsize[$j]}" + if [[ "${dev1[$i]}" == "/dev/${dev2[$j]}" ]] + then + printsize="${prsize[$j]}" # echo "printsize=$printsize" - fi - done + fi + done - if [[ -n "$printsize" ]] - then - string="Name: ${nam1[$i]}${spacer} Dev: ${dev1[$i]} Size: $printsize" - if [[ "$switch" == "true" ]] - then - usbstring="${string/Name\:\ usb\-/USB: }" - if [[ "$usbstring" != "$string" ]] - then - echo -e "$usbstring" - LOGecho "USB: $usbstring" - fi - else - echo -e "$string" - LOGecho "DRIVE: $string" - fi - fi + if [[ -n "$printsize" ]] + then + string="Name: ${nam1[$i]}${spacer} Dev: ${dev1[$i]} Size: $printsize" + if [[ "$switch" == "true" ]] + then + usbstring="${string/Name\:\ usb\-/USB: }" + if [[ "$usbstring" != "$string" ]] + then + echo -e "$usbstring" + LOG_ECHO "USB: $usbstring" + fi + else + echo -e "$string" + LOG_ECHO "DRIVE: $string" + fi + fi done diff -Nru obi-installer-3.3.0ubuntu0/OBI/locale-lister obi-installer-3.4.0ubuntu0/OBI/locale-lister --- obi-installer-3.3.0ubuntu0/OBI/locale-lister 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/locale-lister 2018-03-15 13:13:10.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash -## -## +## +## ###################################### ## ## ## Locale Lister ## @@ -10,22 +10,22 @@ ## Israel-D israeldahl@gmail.com ## ## ## ###################################### -## -## $$$$$$ +## +## $$$$$$ ## $$$$$$$$ LL IIIIII NN NN UU UU XX XX -## $ $ $$ LL II NNN NN UU UU XXXX -## $/o$o\$$ LL II NNNN NN UU UU XX -## $////$$$$ LL II NN NNNN UU UU XXXX +## $ $ $$ LL II NNN NN UU UU XXXX +## $/o$o\$$ LL II NNNN NN UU UU XX +## $////$$$$ LL II NN NNNN UU UU XXXX ## <<<<<$$$$ LLLLLL IIIIII NN NN UUUU XX XX -## $......$$$ +## $......$$$ ## $........$$$$ Jesus Is LORD -## $.........$$$$ -## $.........$$$$ -## $..........$$$$$ -## $$..........$$$$$ -## ###........###$$$ -## #####........####$$ -## #######........###### +## $.........$$$$ +## $.........$$$$ +## $..........$$$$$ +## $$..........$$$$$ +## ###........###$$$ +## #####........####$$ +## #######........###### ## #######$......$###### eval_gettext(){ printf "%s" "$*" @@ -35,34 +35,34 @@ export TEXTDOMAIN=obi-installer ############################################################################# SelectLanguage=$(eval_gettext "Select Language") -Code=$(eval_gettext "Code") -Name=$(eval_gettext "Name") -UsethisLocale=$(eval_gettext "Use this Locale:") +Code=$(eval_gettext "Language Code") +Name=$(eval_gettext "Language Name") +UsethisLocale=$(eval_gettext "Use this Language:") ############################################################################# +unset USEZENITY [[ -f "$HOME/usezenity" ]] && USEZENITY="$( < $HOME/usezenity)" +[[ -z "$DISPLAY" ]] && unset USEZENITY unset myLANG -##this is used for localization -[[ -n "$myLANG" ]] || myLANG="${LANGUAGE%%_*}" -[[ -n "$myLANG" ]] || myLANG="${LANG%_*}" -[[ -z "$myLANG" ]] || myLANG="en" +myLANG="en" locate_file(){ CheckFer="$1" local IFS=":" for i in ${XDG_DATA_DIRS:-/usr/share} do - if [[ -f "${i%/}/$CheckFer" ]] + if [[ -f "${i%/}/OBI/$CheckFer" ]] then - echo "${i%/}/$CheckFer" - return + echo "${i%/}/OBI/$CheckFer" + return 0 fi done + return 1 } read_langs(){ - thisFILE="$PWD/all_languages" + thisFILE="/usr/share/OBI/all_languages" if [[ ! -f "$thisFILE" ]] then - thisFILE="/usr/share/OBI/all_languages" - [[ ! -f "$thisFILE" ]] && FILE="$(locate_file all_languages)" + thisFILE="$PWD/OBI/all_languages" + [[ ! -f "$thisFILE" ]] && thisFILE="$(locate_file all_languages)" fi while read LINE || [[ -n "$LINE" ]] do @@ -82,12 +82,14 @@ ;; esac done < "$thisFILE" + return 0 } list_locales(){ LIST=($(read_langs)) if [[ "$USEZENITY" == "true" ]] then ans=$(zenity --list --height=400 --width=300 --text="$SelectLanguage" --title="$SelectLanguage" --column="$Code" --column="$Name" "${LIST[@]}" 2>/dev/null) + retval="$?" else var="${#LIST[@]}" if (( $var & 1 )) @@ -96,10 +98,11 @@ LIST=(${LIST[@]} "$SelectLanguage") fi ans=$(dialog --no-shadow --backtitle "$SelectLanguage" --title "$SelectLanguage" --wmclass "OBI" --menu "$SelectLanguage" 19 76 12 ${LIST[@]} 3>&1 1>&2 2>&3 3>&-) - + retval="$?" fi - (( $? != 0 )) && return 1 + [[ -z "${ans}" ]] && (( retval != 0 )) && return 1 echo "${ans}" + return 0 } use_this(){ localei="$1" @@ -119,16 +122,52 @@ [[ -n "$LOCALER" ]] && use_this "$LOCALER" || return 1 echo "$LOCALER" } +addToBash(){ + HOMER="${1:-$HOME}" + MYLANG="${2:-en_US.UTF-8}" + unset FOUNDLC + if [[ -f "${HOMER}/.bashrc" ]] + then + while read LINE + do + case $LINE in + "export LANG="*)OUTPUT="${OUTPUT} +export LANG=$MYLANG" + FOUNDLC="true" + ;; + *)OUTPUT="${OUTPUT} +${LINE}" + ;; + esac + done < "${HOMER}/.bashrc" + [[ -z "$FOUNDLC" ]] && OUTPUT="${OUTPUT} +export LANG=$MYLANG" + echo "${OUTPUT}" | tee "${HOMER}/.bashrc" + else + echo "export LANG=$MYLANG" | tee "${HOMER}/.bashrc" + fi + LANG="$MYLANG" + export LANG + #source "${HOMER}/.bashrc" + return 0 +} main(){ + HOMER="$1" + LOCALE_FILE="$2" MY_LOCALE=$(get_locale) [[ -z "$MY_LOCALE" ]] && exit 1 UTF_STRING=".UTF-8" if [[ -f "$LOCALE_FILE" ]] then echo "LANG=$MY_LOCALE$UTF_STRING" | tee "$LOCALE_FILE" - else + fi + if [[ -n "$(which localectl)" ]] + then localectl set-locale "LANG=$MY_LOCALE$UTF_STRING" + fi +# addToBash "${HOMER}" "$MY_LOCALE$UTF_STRING" + return 0 } LOCALE_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/locale.conf" usage(){ @@ -153,6 +192,7 @@ shift fi ;; + --home)[[ -d "$2" ]] && HOMER="$2";; -h|-\?|--help) usage;; --) shift @@ -162,4 +202,8 @@ esac shift done -main +[[ -z "${HOMER}" ]] && HOMER="$HOME" +export HOMER +main "${HOMER}" "$LOCALE_FILE" +unset HOMER +exit 0 diff -Nru obi-installer-3.3.0ubuntu0/OBI/makethingsexecutable obi-installer-3.4.0ubuntu0/OBI/makethingsexecutable --- obi-installer-3.3.0ubuntu0/OBI/makethingsexecutable 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/makethingsexecutable 2018-03-15 13:13:10.000000000 +0000 @@ -1,5 +1,5 @@ #!/bin/bash -for i in autoselect clean-myself.bash clearOBI confirm-partition Desktop dltbl findtbl fix-device functions grub-installer hardware-search hw-progress init-dialog install-pae keyboard-switcher labelfix ldeb limg list_drives locale-lister makethingsexecutable memer menumethod-lister mkctrl mkhelp mkhome mkp mkp1 mkp2p1 mkpxpy mktbl obi obi-readme partition-help position_win restore_xz-lzma select-device select-part1 select-part2 select-tarball setlevel starter systar text-mode-menu truncate-log user-config zmktbl zmktbl-wrapper zoned-out +for i in Desktop autoselect clean-myself.bash clearOBI confirm-partition dltbl findtbl fix-device functions grub-installer hardware-search hw-progress init-dialog install-pae keyboard-switcher labelfix ldeb limg list_drives locale-lister makethingsexecutable memer menumethod-lister mkctrl mkhelp mkhome mkp mkp1 mkp2p1 mkpxpy mktbl obi obi-functions obi-readme partition-help position_win select-device select-part1 select-part2 select-tarball setlevel starter systar text-mode-menu truncate-log user-config zmktbl zmktbl-wrapper zoned-out do if [[ ! -x $i ]] then diff -Nru obi-installer-3.3.0ubuntu0/OBI/memer obi-installer-3.4.0ubuntu0/OBI/memer --- obi-installer-3.3.0ubuntu0/OBI/memer 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/memer 2018-03-15 13:13:10.000000000 +0000 @@ -8,8 +8,8 @@ sum=$(($sum *1024)) if (( $sum == 0 )) then - ram=$(free|grep "Mem:"|tr -s ' ' '\t'|cut -f 2) - echo "$ram" + ram=$(free|grep "Mem:"|tr -s ' ' '\t'|cut -f 2) + echo "$ram" else - echo "$sum" + echo "$sum" fi diff -Nru obi-installer-3.3.0ubuntu0/OBI/menumethod-lister obi-installer-3.4.0ubuntu0/OBI/menumethod-lister --- obi-installer-3.3.0ubuntu0/OBI/menumethod-lister 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/menumethod-lister 2018-03-15 13:13:10.000000000 +0000 @@ -1,27 +1,29 @@ #!/bin/bash -LIST=($(ls /etc/menu-methods)) TOTAL=0 -for i in "${LIST[@]}" +for i in /etc/menu-methods/** do - if [ "${i/xdg-}" != "${i}" ] || [ "${i/menu-xdg}" != "${i}" ] || [ "$i" == "jwm" ] - then - echo "Not using $i" - else - if [ -x "/etc/menu-methods/$i" ] - then - XLIST=("/etc/menu-methods/$i" "${XLIST[@]}") - #echo "$i is executable" - TOTAL=$(( $TOTAL + 1 )) - fi - fi + case ${i/*\/} in + "xdg-"*|"menu-xdg"|"jwm")echo " Not using $i";; + *) + if [[ -x "$i" ]] + then + XLIST=("$i" ${XLIST[@]}) + echo "$i is executable" + TOTAL=$(( TOTAL + 1 )) + fi + ;; + esac done -INC=$(( 100 / $TOTAL )) +INC=$(( 100 / TOTAL )) #echo $INC j=0 + for i in "${XLIST[@]}" do -echo $j -$i -j=$(( $INC + $j )) + echo "$j" + echo "$i" + $i + j=$(( INC + j )) done + echo 100 diff -Nru obi-installer-3.3.0ubuntu0/OBI/mkctrl obi-installer-3.4.0ubuntu0/OBI/mkctrl --- obi-installer-3.3.0ubuntu0/OBI/mkctrl 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/mkctrl 2018-03-15 13:13:10.000000000 +0000 @@ -1,137 +1,106 @@ #!/bin/bash -. gettext.sh +eval_gettext(){ + echo -e "$*" +} +source gettext.sh export TEXTDOMAIN=obi-installer ########################################################### -Errorfindingthetarballpath=$(eval_gettext "Error finding the tarball path") TarballPath=$(eval_gettext "Tarball path") notfoundornotafile=$(eval_gettext "not found or not a file") -PressEntertocontinue=$(eval_gettext "Press Enter to continue") Tryingwiththedefaulttarball=$(eval_gettext "Trying with the default tarball") -SELECTED=$(eval_gettext "Selected") Nonamespecifiedusingnameofthetarball=$(eval_gettext "No system name specified, using the name of the tarball") -OBIdirectory=$(eval_gettext "OBI directory") -ErrorfindingtheOBIpath=$(eval_gettext "Error finding the OBI path") ########################################################### -[[ -f "$HOME/usezenity" ]] && USEZENITY=$(cat "$HOME/usezenity") -LOGecho(){ - if [[ "$USEZENITY" == "true" ]] - then - echo -e "
[mkctrl]
$*" >> "${HOME}"/obi-installer.log - else - echo -e "[mkctrl] $*" >> "${HOME}"/obi-installer.log - fi + +################################################ +## Source our handy functions!! +## make sure they are in the PATH first +OBI_SHARE_DIR="/usr/share/OBI" +if [[ -d "${OBI_SHARE_DIR}" ]] && [[ "${PATH/$OBI_SHARE_DIR}" == "${PATH}" ]] +then + PATH="${PATH}:/usr/share/OBI" + export PATH +elif [[ "${PATH/$PWD}" == "${PATH}" ]] +then + PATH="${PATH}:${PWD}" + export PATH +fi +source obi-functions || exit +################################################ +mkctlECHO() { + echoOut "mkctl" "$*" +} +mkctlLOG_ECHO(){ + echoLOG "mkctl" "$*" } mkctrl() { - ## arguments - [[ -n "$1" ]] && obi_system="$1" - [[ -n "$2" ]] && tarball="$2" - [[ -n "$3" ]] && rootpart="$3" # why? - [[ -n "$4" ]] && swappart="$4" # why? - - advanced=false - obilevel="obilevel" - partitions="partitions" - [[ -z "$obi_system" ]] && obi_system="$( < $HOME/OSname)" - LOGecho "mkctrl()--->obi_system=$obi_system\ntarball=$tarball\nrootpart=$rootpart\nswappart=$swappart\n" - - # check for previous selection - if [[ -f "/usr/share/OBI/selected" ]] - then - selected="/usr/share/OBI/selected" - elif [[ -f "$HOME/selected" ]] - then - selected="$HOME/selected" - elif [[ -d "$PWD/selected" ]] - then - selected="$PWD/selected" - else - selected="selected" - fi - - # check for OBI dir - if [[ -f "/usr/share/OBI/autoselect" ]] - then - curdir="/usr/share/OBI" - MESSAGE_OUT="$SELECTED:$selected\n$OBIdirectory:$curdir" - elif [ -f "$HOME/autoselect" ] - then - curdir="$HOME" - MESSAGE_OUT="$SELECTED:$selected\n$OBIdirectory:$curdir" - elif [[ -d "$PWD/autoselect" ]] - then - curdir="$PWD" - MESSAGE_OUT="$SELECTED:$selected\n$OBIdirectory:$curdir" - else - echoout "$ErrorfindingtheOBIpath" - exit - fi + +## arguments + obi_system="$1" + tarball="$2" + LOGMSG="obi_system=$obi_system\ntarball=$tarball" + [[ -n "$3" ]] && rootpart="$3" && LOGMSG="${LOGMSG}\nrootpart=$rootpart"# confirm-partition + [[ -n "$4" ]] && swappart="$4" && LOGMSG="${LOGMSG}\nswappart=$swappart\n"# confirm-partition + + advanced=false + # check for OBI dir + curdir="$(getDpath)" + obilevel="$curdir/obilevel" + + + mkctlLOG_ECHO "${LOGMSG}" + +# check for previous selection + selected="$(selector_of_tarball_dir)" #tarpath finder.... - if [[ -d "/tarballs" ]] - then - tarpath="/tarballs" - wdir=/ - elif [[ -d "${HOME}/tarballs" ]] - then - tarpath="${HOME}/tarballs" - wdir="${HOME}"/ - elif [[ -d "${PWD}/tarballs" ]] - then - tarpath="${PWD}/tarballs" - wdir="${PWD}"/ - else - tarpath="${PWD}" - wdir="${PWD}"/ - MESSAGE_OUT="${MESSAGE_OUT}\n$Errorfindingthetarballpath" - fi - - #tarball name - MESSAGE_OUT="${MESSAGE_OUT}\n$TarballPath:$tarpath" - if [[ -s "$selected" ]] - then - read tarball < "$selected" - fi - - if [[ "${tarball:0:8}" == "tarballs" ]] - then - tarball="$tarball" - fi - - if [[ "${tarball}" == "${tarpath}/" ]] - then - tarball="${tarpath}/ball.tar.xz" - MESSAGE_OUT="${MESSAGE_OUT}\n$Tryingwiththedefaulttarball \"$tarball\"" - fi - if [[ ! -f "$tarball" ]] - then - echoout "${MESSAGE}\n$tarball - $notfoundornotafile" - if [[ "$USEZENITY" != "true" ]] - then - read -p "$PressEntertocontinue" - fi - exit - fi - - if [[ -z "$obi_system" ]] - then - MESSAGE_OUT="${MESSAGE_OUT}\n$Nonamespecifiedusingnameofthetarball" - obi_system="${tarball/.tar.[gx]z}" - obi_system=$(basename "$obi_system") - MESSAGE_OUT="${MESSAGE_OUT}\n$obi_system" - # read -p "$PressEntertocontinue" - fi - - LOGecho "[mkctrl]${MESSAGE_OUT}" - if [[ -s "$obilevel" ]] - then - read ans < "$obilevel" - if [ "$ans" == "advanced" ] - then - advanced=true - # autoselect partitions - [[ -n "$curdir" ]] && curdir="/usr/share/OBI" - "$curdir"/autoselect - fi - fi + tarpath="$(findTarballDirectory)" + +#tarball name + + if [[ ! -f "$tarball" ]] + then + MESSAGE_OUT="${MESSAGE_OUT}\n$TarballPath:$tarpath" + if [[ -s "$selected" ]] + then + tarball=$( < "$selected") + fi + + if [[ "${tarball:0:8}" == "tarballs" ]] + then + tarball="$tarball" + fi + + if [[ "${tarball}" == "${tarpath}/" ]] + then + tarball="${tarpath}/ball.tar.xz" + MESSAGE_OUT="${MESSAGE_OUT}\n$Tryingwiththedefaulttarball \"$tarball\"" + fi + if [[ ! -f "$tarball" ]] + then + ErrorExit "mkctrl" 1 "${MESSAGE}\n$tarball - $notfoundornotafile" + fi + fi + + if [[ -z "$obi_system" ]] + then + MESSAGE_OUT="${MESSAGE_OUT}\n$Nonamespecifiedusingnameofthetarball" + obi_system="${tarball/.tar.[gx]z}" + obi_system=$(basename "$obi_system") + MESSAGE_OUT="${MESSAGE_OUT}\n$obi_system" + fi + + [[ -n "${MESSAGE_OUT}" ]] && mkctlLOG_ECHO "${MESSAGE_OUT}" + if [[ -s "$obilevel" ]] + then + ans=$( < "$obilevel") + if [[ "${ans,,}" == "advanced" ]] + then + advanced=true + export advanced +# autoselect partitions based on obi-* names + "$curdir"/autoselect + fi + fi + return 0 } diff -Nru obi-installer-3.3.0ubuntu0/OBI/mkhelp obi-installer-3.4.0ubuntu0/OBI/mkhelp --- obi-installer-3.3.0ubuntu0/OBI/mkhelp 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/mkhelp 2018-03-15 13:13:10.000000000 +0000 @@ -1,22 +1,19 @@ #!/bin/bash -. gettext.sh -export TEXTDOMAIN=obi-installer -########################################################### -prgnam=$(eval_gettext "One Button Installer") -########################################################### -if [[ -z "$version" ]] + +################################################ +## Source our handy functions!! +## make sure they are in the PATH first +OBI_SHARE_DIR="/usr/share/OBI" +if [[ -d "${OBI_SHARE_DIR}" ]] && [[ "${PATH/$OBI_SHARE_DIR}" == "${PATH}" ]] +then + PATH="${PATH}:/usr/share/OBI" + export PATH +elif [[ "${PATH/$PWD}" == "${PATH}" ]] then - APTCACHE=$(which apt-cache) - if [[ -n "${APTCACHE}" ]] - then - ver_no=$(apt-cache policy one-button-installer | grep Installed: | sed 's/Installed://' | sed 's/ubuntu.*//') - version="$prgnam $ver_no" - else - ## if we can't find apt-cache to grep the version just display the program name - version="$prgnam" - fi - export version + PATH="${PATH}:${PWD}" + export PATH fi -source functions +source obi-functions || exit +################################################ mkhelp diff -Nru obi-installer-3.3.0ubuntu0/OBI/mkhome obi-installer-3.4.0ubuntu0/OBI/mkhome --- obi-installer-3.3.0ubuntu0/OBI/mkhome 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/mkhome 1970-01-01 00:00:00.000000000 +0000 @@ -1,73 +0,0 @@ -#!/bin/bash -. gettext.sh -export TEXTDOMAIN=obi-installer -########################################################### -homepartitionisnotspecified=$(eval_gettext "Home partition is not specified, as obi-home") -########################################################### -USEZENITY="FALSE" -[[ -f "$HOME/usezenity" ]] && USEZENITY=$(cat "$HOME/usezenity") -ICONPATH="/usr/share/icons/hicolor/48x48/apps/obi-window-icon.png" -ZEN_ICON="--window-icon=$ICONPATH" -tailfile="${HOME}"/.obi-progress -LOGecho(){ - if [[ "$USEZENITY" == "true" ]] - then - echo -e "
[mkhome]
$*" >> "${HOME}"/obi-installer.log - else - echo -e "[mkhome] $*" >> "${HOME}"/obi-installer.log - fi -} - -if [[ -f "${CHROOT}/etc/fstab" ]] -then - cp "${CHROOT}/etc/fstab" "${CHROOT}/etc/fstab0" -else - echoout "$MISSING ${CHROOT}/etc/fstab" - exit -fi - -## read the variables from the partitions file -while read LINE || [[ "$LINE" ]] -do - case $LINE in - obi-home:*)homepart="${LINE/*:}";; - *);; - esac -done < "$partitions" - -if [[ -n $homepart ]] -then - if [[ "${RELEASE}" == "precise" ]] - then - homeUUID=$(blkid "$homepart"|sed -e 's/.*UUID="//' -e 's/".*//') - else - homeUUID=$(blkid "$homepart"|sed -e 's/.* UUID="//' -e 's/".*//') - fi - NEWfstabLine="UUID=$homeUUID /home ext4 errors=remount-ro 0 1 " - while read LINE || [[ "$LINE" ]] - do - case $LINE in - */home*)fstabHOME="${LINE}";; - *) - [[ -n "${NORMAL}" ]] && NORMAL="${NORMAL} -${LINE}" - [[ -z "${NORMAL}" ]] && NORMAL="${LINE}" - ;; - esac - done < "${CHROOT}/etc/fstab0" - if [[ -z "$fstabHOME" ]] - then - echo "$NEWfstabLine" >> "${CHROOT}/etc/fstab0" - else - echo "$NORMAL -$NEWfstabLine" > "${CHROOT}/etc/fstab0" - fi - mv "${CHROOT}/etc/fstab0" "${CHROOT}/etc/fstab" - LOGecho "HOME fstab:
$(cat ${CHROOT}/etc/fstab)
" -else - - - LOGecho "home partition is not specified" - exit -fi - diff -Nru obi-installer-3.3.0ubuntu0/OBI/mkp obi-installer-3.4.0ubuntu0/OBI/mkp --- obi-installer-3.3.0ubuntu0/OBI/mkp 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/mkp 2018-03-15 13:13:10.000000000 +0000 @@ -1,10 +1,11 @@ #!/bin/bash -. gettext.sh +eval_gettext(){ + echo -e "$*" +} +source gettext.sh export TEXTDOMAIN=obi-installer ########################################################### -ScriptnotfoundChangedirectory=$(eval_gettext "Script not found. Change directory!") Diskissmallerthan=$(eval_gettext "Disk is smaller than") -Errorfindingthetarballpath=$(eval_gettext "Error finding the tarball path") onlygzipandxzcompressionimplemented=$(eval_gettext "only gzip and xz compression implemented") thetarballisexpandedsyncingthedrive=$(eval_gettext "(the tarball) is expanded, syncing the drive") RebootNow=$(eval_gettext "Reboot Now") @@ -16,76 +17,96 @@ Extracting=$(eval_gettext "Extracting:") LOGTITLE=$(eval_gettext "OBI Log File") ReadLog=$(eval_gettext "Do you want to check the install Log?") -MISSING=$(eval_gettext "MISSING") OneButtonInstaller=$(eval_gettext "One Button Installer") choose_this=$(eval_gettext "If unsure choose this device:") +mountofwhatshouldbecometherootpartitionfailed=$(eval_gettext "mount of what should become the root partition failed") +Useexistingswappartition=$(eval_gettext "Use existing swap partition") +keepitsUUID=$(eval_gettext "keep its UUID") +Makeaswappartition=$(eval_gettext "Make a swap partition") +andgetnewUUID=$(eval_gettext "and get new UUID") +Formatting=$(eval_gettext "Formatting:") ########################################################### -USEZENITY="FALSE" -[[ -f "$HOME/usezenity" ]] && USEZENITY=$(cat "$HOME/usezenity") -ICONPATH="/usr/share/icons/hicolor/48x48/apps/obi-window-icon.png" -ZEN_ICON="--window-icon=$ICONPATH" -#CPUarchFile="$HOME/distro.cpu" -tailfile="${HOME}"/.obi-progress -LOGecho(){ - if [[ "$USEZENITY" == "true" ]] - then - echo -e "
[mkp]
$*" >> "${HOME}"/obi-installer.log - else - echo -e "[mkp] $*" >> "${HOME}"/obi-installer.log - fi + +################################################ +## Source our handy functions!! +## make sure they are in the PATH first +OBI_SHARE_DIR="/usr/share/OBI" +if [[ -d "${OBI_SHARE_DIR}" ]] && [[ "${PATH/$OBI_SHARE_DIR}" == "${PATH}" ]] +then + PATH="${PATH}:/usr/share/OBI" + export PATH +elif [[ "${PATH/$PWD}" == "${PATH}" ]] +then + PATH="${PATH}:${PWD}" + export PATH +fi +source obi-functions || exit 1 +################################################ + +## wrapper for obi-function to log things +ECHO() { + echoOut "mkp" "$*" ## in obi-functions } +LOG_ECHO(){ + echoLOG "mkp" "$*" ## in obi-functions +} +## this file is sourced by the other mkp* files and they use this set of common things + +## common variables +[[ -z "$USEZENITY" ]] && USEZENITY="$(getZenity)" +ICONPATH="$(getIcon)" +ZEN_ICON="--window-icon=$ICONPATH" + +## reads a filename and counts the times something appears appears +## ARGS +# 1 - filename to read +# 2 - thing to look for readLOOP(){ - LIST="" - FILENAME="$1" - thing="$2" - iter=0 - while read LINE || [ "$LINE" ] - do - case $LINE in - '#'*);; - *$thing*) - RESULT="${LINE/ *}" - RESULT="${RESULT/*=}" - LIST="$RESULT ${LIST[*]}" - iter=$(( iter + 1 ));; - *);; - esac - done < "$FILENAME" - echo "$iter" - #echo "${LIST[*]}" -} -forceUmount(){ - [[ -z "${CHROOT}" ]] && CHROOT="/mnt" - MOUNTIE=$(mount |grep "${CHROOT}") - if [[ -n "${MOUNTIE}" ]] - then - LOGecho "found: ${MOUNTIE}" - umount --force "${CHROOT}" && LOGecho "ran: umount --force ${CHROOT}" - fi + LIST="" + FILENAME="$1" + thing="$2" + iter=0 + while read LINE || [ "$LINE" ] + do + case $LINE in + '#'*);; + *$thing*) + RESULT="${LINE/ *}" + RESULT="${RESULT/*=}" + LIST="$RESULT ${LIST[*]}" + iter=$(( iter + 1 ));; + *);; + esac + done < "$FILENAME" + echo "$iter" + return 0 } + +## log the obi version for debugging logVersion(){ - APTCACHE=$(which apt-cache) - if [[ -n "${APTCACHE}" ]] - then - ver_no=$(apt-cache policy obi-installer | grep 'Installed:') - ver_no="${ver_no/*Installed:}" - ver_no="${ver_no/ubuntu*}" - ver_no="${ver_no/~*}" - ver_no="${ver_no// }" - LOGecho "$ver_no" - else - LOGecho "not apt based OS" - fi + LOG_ECHO "$(getVersion)" + return 0 } + +## generate an fstab file +## ARGS +# 1 - UUID of the root '/' partition +# 2 - device of the root partition +# 3 - UUID of the swap partition +# 4 - swap device partition +# 5 - UUID of the '/home' partition +# 6 - device of the '/home' partition make_fstab(){ - [[ -z "${CHROOT}" ]] && CHROOT="/mnt" - ROOTUUID="$1" + CHROOT="$1" + CHROOT=$(chrootDirectory "${CHROOT}") + ROOTUUID="$2" [[ -z $ROOTUUID ]] && return 1 - DEV1="$2" - SWAPUUID="$3" - DEV2="$4" - HOMEUUID="$5" - DEV3="$6" + DEV1="$3" + [[ -z $DEV1 ]] && return 1 + SWAPUUID="$4" + DEV2="$5" + HOMEUUID="$6" + DEV3="$7" FSTAB="# /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a @@ -114,322 +135,700 @@ sudo chmod o-w "${CHROOT}/etc/fstab" sudo chmod ugo+r "${CHROOT}/etc/fstab" sudo chmod ugo-x "${CHROOT}/etc/fstab" - LOGecho "Made ${CHROOT}/etc/fstab\n${FSTAB}" + if [[ "$USEZENITY" == "true" ]] + then + LOG_ECHO "Made ${CHROOT}/etc/fstab
${FSTAB}
" + else + LOG_ECHO "Made ${CHROOT}/etc/fstab\n${FSTAB}" + fi + return 0 } + +## clean up the log file's HTML for easy reading in a text editor removeHTMLtags(){ - FILENAME="$1" - if [[ -f "$FILENAME" ]] - then - LOGecho "removed HTML tags from $FILENAME" - sed -i "s#
#\n#g" "$FILENAME" - sed -i "s#
#\n#g" "$FILENAME" - sed -i "s#<[^>]*>##g" "$FILENAME" - sed -i 's/<[a-zA-Z\/][^>]*>//g' "$FILENAME" - sed -e 's/<[a-zA-Z\/][^>]*>//g' "$FILENAME" - else - LOGecho "$FILENAME is not a file" - fi + FILENAME="$1" + if [[ -f "$FILENAME" ]] + then + LOG_ECHO "removed HTML tags from $FILENAME" + sed -i 's#
#\n#g' "$FILENAME" >/dev/null + sed -i 's#
#\n#g' "$FILENAME" >/dev/null + sed -i 's#<[^>]*>##g' "$FILENAME" >/dev/null + sed -i 's/<[a-zA-Z\/][^>]*>//g' "$FILENAME" >/dev/null + sed -e 's/<[a-zA-Z\/][^>]*>//g' "$FILENAME" >/dev/null + else + LOG_ECHO "$FILENAME is not a file" + fi + return 0 } + +## save the log file saveLOG(){ - [[ -z "${CHROOT}" ]] && CHROOT="/mnt" - HOMEdir=$(ls "${CHROOT}/home") - logDir="${CHROOT}/home/${HOMEdir%/}" - logFileORG="${HOME}/obi-installer.log" - logFile="${logDir}/obi-installer-$(date -I).log" - LOGecho " saveLOG()--> $logDir$logFile" - cp "$logFileORG" "$logFile" - retval=$? - (( retval == 0 )) && LOGecho "saved $logFileORG as $logFile" - (( retval != 0 )) && LOGecho "[WARNING] DID NOT save $logFileORG as $logFile" - [[ -f "$logFile" ]] && removeHTMLtags "$logFile" - [[ ! -f "$logFile" ]] && cp "$logFileORG" "$logDir/obi-installer.log" && removeHTMLtags "$logDir/obi-installer.log" + CHROOT=$(chrootDirectory "${CHROOT}") + HOMEdir=$(ls "${CHROOT}/home") + logDir="${CHROOT}/home/${HOMEdir%/}" + logFileORG="${HOME}/obi-installer.log" + logFile="${logDir}/obi-installer-$(date -I).log" + LOG_ECHO " saveLOG()--> $logFile" + cp "$logFileORG" "$logFile" + retval=$? + (( retval == 0 )) && LOG_ECHO "saved $logFileORG as $logFile" + (( retval != 0 )) && LOG_ECHO "[WARNING] DID NOT save $logFileORG as $logFile" + [[ -f "$logFile" ]] && removeHTMLtags "$logFile" + [[ ! -f "$logFile" ]] && cp "$logFileORG" "$logDir/obi-installer.log" && removeHTMLtags "$logDir/obi-installer.log" + return "$retval" } + +## figure out where OBI lives using obi-functions getpath() { - echo "40 #OBI progress">> "$tailfile" - if [[ -f "/home/$USER/obi" ]] - then - dpath="/home/$USER" - elif [[ -f "$PWD/obi" ]] - then - dpath="$PWD" - elif [[ -f "${HOME}/obi" ]] - then - dpath="${HOME}" - elif [[ -f "/usr/share/OBI/obi" ]] - then - dpath="/usr/share/OBI" - else - echoout "$ScriptnotfoundChangedirectory" - exit 1 - fi - echo "$dpath" + dpath="$(getDpath)" + echo "$dpath" + return 0 +} + +## Get the sectors from a specific device +# 1 - The device to get the sectors from +getSectors(){ + DEV="$1" + sectors=$(fdisk -lu "$DEV"|grep "sectors$"|cut -d ' ' -f 8) + if [[ "$sectors" == "sectors" ]] + then +## sometimes this cuts the wrong field between Ubuntu and Debian, so do this if the first one fails + sectors=$(fdisk -lu "$DEV"|grep "sectors$"|cut -d ' ' -f 7) + fi + echo "$sectors" +} + +## Get the sector size from a specific device +# 1 - The device to get the sector size from +getSectorSize(){ + Dev="$1" + sectsize=$(fdisk -lu "$Dev"|grep "Sector size"|cut -d ' ' -f 4) + if [[ -z "$sectsize" ]] + then +## sometimes this cuts the wrong field between Ubuntu and Debian, so do this if the first one fails + sectsize=$(fdisk -lu "$Dev"|grep "Units = sectors"|cut -d ' ' -f 9) + fi + echo "$sectsize" +} + +## Get the minimum size from a specific device +# 1 - The sector size to check +getDiskMS(){ + SectorSize="$1" + diskmin=8 #GB + diskms=$(($diskmin*1000*1000*1000/$SectorSize)) + echo "$diskms" +} + +## Get the swap size that should be used +# 1 - The device to pass into the sector size checker +getSwapSize(){ + DEV="$1" +#### this is another script + ram=$("$dpath"/memer) + ram=$(($ram)) + sectsize="$(getSectorSize $DEV)" + sectsize=$(($sectsize)) + swapsize=$(( (ram+512*1024)*1024*105/100/sectsize )) + echo "$swapsize" } +## Get the swap info for a specific device +# 1 - The device to get the swap info for swapsize(){ - device="$1" - LC_ALL=C - LANG=C - diskmin=8 # GB - if [[ -z "$dpath" ]] - then - dpath=$(getpath) - export dpath - fi - ram=$("$dpath"/memer) - export ram - sectors=$(fdisk -lu "$device"|grep "sectors$"|cut -d ' ' -f 8) - if [[ "$sectors" == "sectors" ]] - then - sectors=$(fdisk -lu "$device"|grep "sectors$"|cut -d ' ' -f 7) - fi - sectsize=$(fdisk -lu "$device"|grep "Sector size"|cut -d ' ' -f 4) - if [[ -z "$sectsize" ]] - then - sectsize=$(fdisk -lu "$device"|grep "Units = sectors"|cut -d ' ' -f 9) - fi - export sectors=$(($sectors)) - export sectsize=$(($sectsize)) - export diskms=$(($diskmin*1000*1000*1000/$sectsize)) - - if [[ "$sectors" -lt $((diskms/2)) ]] - then - echoout "$Diskissmallerthan $((diskmin/2)) GB" - exit - elif [[ "$sectors" -lt "$diskms" ]] - then - echoout "$Diskissmallerthan $diskmin GB" - sleep 5 - fi - - # previous calculation in sectors - # swapsize=$(( (ram+1024*1024)*1024/sectsize )) - # new fine-tuned calculation in sectors (matching that in partition-help) - # swapsize=$(( (ram+512*1024)*1024/sectsize )) - # swapsize=$((swapsize * 105/100)) - swapsize=$(( (ram+512*1024)*1024*105/100/sectsize )) - - slim=$((sectors/4)) - if [[ "$swapsize" -gt "$slim" ]] - then - swapsize="$slim" - fi - # conversion to Mibibytes - swapsize2=$((swapsize*sectsize/1024/1024)) - [[ -z "$obi_system" ]] && obi_system=$(cat "$HOME/OSname") - - export swapsize="$swapsize" - MSG="$obi_system\n$tarball\n$device\nRAM=$ram\nSectors=$sectors\nSector Size=$sectsize\nDiskms=$diskms\nSwapsize=$swapsize2 MibiBytes" - [[ "$USEZENITY" == "true" ]] && MSG="${MSG//\\n/
}" - LOGecho "$MSG" + Device="$1" + LC_ALL=C + LANG=C + diskmin=8 # GB + if [[ -z "$dpath" ]] + then + dpath=$(getDpath) + export dpath + fi + +## do the math +#### this is another script + ram=$("$dpath"/memer) + + export ram + sectors="$(getSectors $Device)" + sectsize="$(getSectorSize $Device)" + export sectors=$((sectors)) + export sectsize=$((sectsize)) + diskms="$(getDiskMS $sectsize)" + export diskms=$((diskms)) + diskMinOK=$((diskms/2)) +## see if the disk is too small + if (( sectors < diskMinOK )) + then +## too small to really install on + ECHO "$Diskissmallerthan $diskMinOK GB" + exit + elif (( sectors < diskms )) + then +## warn the user they have a small disk + ECHO "$Diskissmallerthan $diskmin GB" + sleep 5 + fi + +# previous calculation in sectors, we now use memer to get the variables used below +# swapsize=$(( (ram+1024*1024)*1024/sectsize )) +# new fine-tuned calculation in sectors (matching that in partition-help) +# swapsize=$(( (ram+512*1024)*1024/sectsize )) +# swapsize=$((swapsize * 105/100)) + swapsize="$(getSwapSize $Device)" + swapsize=$(( swapsize )) + + slim=$((sectors/4)) + if [[ "$swapsize" -gt "$slim" ]] + then + swapsize="$slim" + fi +# conversion to Mibibytes + swapsize2=$((swapsize*sectsize/1024/1024)) + [[ -z "$obi_system" ]] && obi_system="$(getOBISystem)" + + export swapsize="$swapsize" + MSG="$obi_system\n$tarball\n$Device\nRAM=$ram\nSectors=$sectors\nSector Size=$sectsize\nDiskms=$diskms\nSwapsize=$swapsize2 MibiBytes" + [[ "$USEZENITY" == "true" ]] && MSG="${MSG//\\n/
}" + LOG_ECHO "$MSG" + return 0 } +## find the directory for the tarballs get_tarpath(){ - if [[ -d "/tarballs" ]] - then - tarpath="/tarballs" - elif [[ -d "${HOME}/tarballs" ]] - then - tarpath="${HOME}/tarballs" - elif [[ -d "${PWD}/tarballs" ]] - then - tarpath="${PWD}/tarballs" - else - tarpath="${PWD}" - LOGecho "$Errorfindingthetarballpath" - fi - echo "$tarpath" + tarpath="$(findTarballDirectory)" + echo "$tarpath" + return 0 +} + +## this function will not work on earlier versions of sfdisk, so it will fail early if the version is wrong +sfdiskCommand(){ + thisDEVICE="$1" + [[ -z "$1" ]] && return 1 + shift + COMMANDS="$*" + [[ -z "${COMMANDS}" ]] && return 1 +## figure out the version of sfdisk, since <=2.26 WONT work + [[ -z "$(which sfdisk)" ]] && return 1 + sfDv="$(sfdisk -v)" + sfDv="${sfDv/* }" + +## only use the version we know how to use + case $sfDv in + 2.26*)return 1;; + 2.27*) LOG_ECHO "Using sfdisk version $sfDv";; + *)return 1;; + esac + RESULT="label: dos +unit: sectors +${COMMANDS}" + retval=0 + if [[ "$USEZENITY" == "true" ]] + then + width=330 + height=80 + (echo "${RESULT}" | sudo sfdisk -f "$thisDEVICE"; echo 100 )| zenity --class=OBI --progress --pulsate --title="$OneButtonInstaller" "$ZEN_ICON" --width="$width" --height="$height" --text="$Formatting $thisDEVICE" --auto-close --no-cancel 2>/dev/null + else + echo "${RESULT}" | sudo sfdisk -f "$thisDEVICE" + fi + retval="$?" + return "$retval" +} + +## extract the tarball! +## all functions are internal or from obi-functions +# ARGS +# 1 - the chroot directory to extract into +# 2 - the tarball to extract +tarballExtractor(){ + thisCHROOTDIR="$1" + [[ -z "${thisCHROOTDIR}" ]] && return 1 + cd "${thisCHROOTDIR}" + tarball="$2" + [[ -z "$tarball" ]] && return 1 + tarpath=$(findTarballDirectory) + startdir="$tarpath" + if [[ "$tarball" == "$(basename "$tarball")" ]] + then + trbll="$startdir/$tarball" + else + trbll="$tarball" + fi + progressTail "45" + +## check if there is gz or xz & extract it!.... if not FAIL + if [[ "$tarball" != "${tarball/.gz}" ]] + then +##GZIP + [[ "$USEZENITY" != "true" ]] && ECHO "$Extracting $trbll" && pv "$trbll" | tar -xz && retval="$?" + + if [[ "$USEZENITY" == "true" ]] + then + width=330 + height=80 + (pv -n "$trbll" | tar -xz) 2>&1 | zenity --class=OBI --progress --title="$OneButtonInstaller" "$ZEN_ICON" --width="$width" --height="$height" --text="$Extracting $trbll" --auto-close --no-cancel 2>/dev/null + retval="$?" + pid="$(pgrep -n zenity)" +## save the zenity pid for killing later, if needed + [[ -n "${pid}" ]] && LOG_ECHO "Found pid for Zenity in mkp: $pid" + [[ -z "${pid}" ]] && LOG_ECHO "Didn't find pid for zenity window for tarball progress" + dpath="$(getDpath)" + "$dpath"/position_win "$pid" "$width" "$height" "2" + fi + + elif [ "$tarball" != "${tarball/.xz}" ] + then +## XZ + [[ "$USEZENITY" != "true" ]] && ECHO "$Extracting $trbll" && pv "$trbll" | tar -xJ + retval="$?" + if [[ "$USEZENITY" == "true" ]] + then + width=330 + height=80 + (pv -n "$trbll" | tar -xJ) 2>&1 | zenity --class=OBI --progress --title="$OneButtonInstaller" "$ZEN_ICON" --width="$width" --height="$height" --text="$Extracting $trbll" --auto-close --no-cancel 2>/dev/null + retval="$?" + pid="$(pgrep -n zenity)" +## save the zenity pid for killing later, if needed + [[ -n "${pid}" ]] && LOG_ECHO "Found pid for Zenity in mkp: $pid" + [[ -z "${pid}" ]] && LOG_ECHO "Didn't find pid for zenity window for tarball progress" + dpath=$(getDpath) + "$dpath"/position_win "$pid" "$width" "$height" "2" + fi + else +## unrecognized archive format + [[ "$USEZENITY" == "true" ]] && ECHO "$onlygzipandxzcompressionimplemented" + [[ "$USEZENITY" != "true" ]] && read -p "$onlygzipandxzcompressionimplemented" + exit 1 + fi + (( retval != 0 )) && LOG_ECHO "[WARNING] return value for extracting the tarball was: $retval" + + LOG_ECHO "$tarball $thetarballisexpandedsyncingthedrive" + + progressTail "65" + + cd "$startdir" + chrootCommand "${thisCHROOTDIR}" "mkp" "sync" ## in obi-functions } +## wrapper function for compatibility... +## TODO: remove this extract_tarball(){ - [[ -z "${CHROOT}" ]] && CHROOT="/mnt" - cd "${CHROOT}" - tarball="$1" - tarpath=$(get_tarpath) - startdir="$tarpath" - if [[ "$tarball" == "$(basename "$tarball")" ]] - then - trbll="$startdir/$tarball" - else - trbll="$tarball" - fi - echo "45 #OBI progress">> "$tailfile" -## check if there is gz or xz.... if not FAIL -if [[ "$tarball" != "${tarball/.gz}" ]] -then - [[ "$USEZENITY" != "true" ]] && echoout "$Extracting $trbll" && pv "$trbll" | tar -xz && retval="$?" - if [[ "$USEZENITY" == "true" ]] - then - width=330 - height=80 - (pv -n "$trbll" | tar -xz) 2>&1 | zenity --class=OBI --progress --title="$OneButtonInstaller" "$ZEN_ICON" --width="$width" --height="$height" --text="$Extracting $trbll" --auto-close --no-cancel - retval="$?" - pid="$(pgrep -n zenity)" - [[ -n "${pid}" ]] && LOGecho "Found pid for Zenity in mkp: $pid" - [[ -z "${pid}" ]] && LOGecho "Didn't find pid for zenity window for tarball progress" - dpath=$(getpath) - "$dpath"/position_win "$pid" "$width" "$height" "2" - fi + tarball="$1" + CHROOT=$(chrootDirectory "${CHROOT}") + tarballExtractor "$CHROOT" "$tarball" +} + +## standardized function to get a UUID from a partition +# 1 - partition to get the UUID from +getUUID(){ + partitionToGet="$1" + [[ -z "${partitionToGet}" ]] && return 1 + baseUUID=$(blkid "$partitionToGet" 2>/dev/null) + thatUUID="${baseUUID/ TYPE=\"*}" + thatUUID="${thatUUID/* UUID=\"}" + thatUUID="${thatUUID//\"}" + [[ $(blkid -U "${thatUUID}") == "${partitionToGet}" ]] || return 1 + [[ -z "${thatUUID}" ]] && return 1 + echo "${thatUUID}" + return 0 +} + +## The function that finishes the installation process +## there is inline comments below, the function is long and pretty complex in areas, and calls many other functions/scripts +## ARGS +# 1 - chroot directory +# 2 - device to potentially install grub to +# 3 - root partition +# 4 - swap UUID +# 5 - swap partition +finishUp(){ + thisCHROOT="$1" + [[ -z "${thisCHROOT}" ]] && return 1 + progressTail "40" + if [[ -z "$dpath" ]] + then + dpath="$(getDpath)" + export dpath + fi + obi_system="$(getOBISystem)" + device="$2" + rootpart="$3" + [[ -z "$rootpart" ]] && return 1 + swapUUID="$4" + swappart="$5" + LOG_ECHO "rootpart=$rootpart" + [[ -n "$swappart" ]] && LOG_ECHO "swappart=$swappart" + [[ -n "$swapUUID" ]] && LOG_ECHO "NEW swap UUID=$swapUUID" + LC_ALL=C + LANG=C + #RELEASE="$(getChrootRelease)" + baseRootUUID=$(getUUID "$rootpart") + rootUUID="$baseRootUUID" + if [[ -z "${rootUUID}" ]] + then + ##TODO + rootUUID=$(blkid "$rootpart"|sed -e 's/.*UUID="//' -e 's/".*//') + fi + [[ -z "${rootUUID}" ]] && return 1 + LOG_ECHO "rootpart=$rootpart\nNEW root UUID=$rootUUID" -elif [ "$tarball" != "${tarball/.xz}" ] -then - [[ "$USEZENITY" != "true" ]] && echoout "$Extracting $trbll" && pv "$trbll" | tar -xJ - retval="$?" - if [[ "$USEZENITY" == "true" ]] - then - width=330 - height=80 - (pv -n "$trbll" | tar -xJ) 2>&1 | zenity --class=OBI --progress --title="$OneButtonInstaller" "$ZEN_ICON" --width="$width" --height="$height" --text="$Extracting $trbll" --auto-close --no-cancel - retval="$?" - pid="$(pgrep -n zenity)" - [[ -n "${pid}" ]] && LOGecho "Found pid for Zenity in mkp: $pid" - [[ -z "${pid}" ]] && LOGecho "Didn't find pid for zenity window for tarball progress" - dpath=$(getpath) - "$dpath"/position_win "$pid" "$width" "$height" "2" - fi -else - [[ "$USEZENITY" == "true" ]] && echoout "$onlygzipandxzcompressionimplemented" - [[ "$USEZENITY" != "true" ]] && read -p "$onlygzipandxzcompressionimplemented" - exit 1 -fi - (( retval != 0 )) && LOGecho "[WARNING] return value for extracting the tarball was: $retval" +# are we using SWAP? + if [[ -n "$swappart" ]] && [[ -n "$swapUUID" ]] + then + make_fstab "${thisCHROOT}" "$rootUUID" "$rootpart" "$swapUUID" "$swappart" || return 1 + else + make_fstab "${thisCHROOT}" "$rootUUID" "$rootpart" || return 1 + fi - LOGecho "$tarball $thetarballisexpandedsyncingthedrive" - echo "65 #OBI progress">> "$tailfile" - cd "$startdir" - chroot "${CHROOT}" sync -} - -finishIT(){ - if [[ -z "$dpath" ]] - then - dpath=$(getpath) - export dpath - fi - [[ -f "$HOME/OSname" ]] && [[ -z "$obi_system" ]] && obi_system=$(cat "$HOME/OSname") - rootpart="$1" - swapUUID="$2" - swappart="$3" - [[ -z "${CHROOT}" ]] && CHROOT="/mnt" - LOGecho "rootpart=$rootpart" - [[ -n "$swappart" ]] && LOGecho "swappart=$swappart" - [[ -n "$swapUUID" ]] && LOGecho "NEW swap UUID=$swapUUID" - LC_ALL=C - LANG=C - dpath=$(getpath) - RELEASE=$(chroot "${CHROOT}" bash -c "lsb_release -a | grep Codename:| sed 's/.*\t//'") - if [[ "${RELEASE}" == "precise" ]] - then - rootUUID=$(blkid "$rootpart"|sed -e 's/.*UUID="//' -e 's/".*//') - else - rootUUID=$(blkid "$rootpart"|sed -e 's/.* UUID="//' -e 's/".*//') - fi - LOGecho "rootpart=$rootpart\nNEW root UUID=$rootUUID" - if [[ -f "${CHROOT}/boot/grub/grub.cfg" ]] - then - cp "${CHROOT}/boot/grub/grub.cfg" "${CHROOT}/boot/grub/grub.cfg0" - else - echoout "$MISSING ${CHROOT}/boot/grub/grub.cfg" - exit - fi - if [[ -f "${CHROOT}/etc/grub.d/40_custom" ]] - then - cp "${CHROOT}/etc/grub.d/40_custom" "${CHROOT}/etc/grub.d/40_custom0" - else - echooout "$MISSING ${CHROOT}/etc/grub.d/40_custom" - exit - fi - # are we using SWAP? - if [[ -n "$swappart" ]] && [[ -n "$swapUUID" ]] - then - make_fstab "$rootUUID" "$rootpart" "$swapUUID" "$swappart" - else - make_fstab "$rootUUID" "$rootpart" - fi - ##TODO make_grub "$rootUUID" - sed s/"$rootuid"/"$rootUUID"/ "${CHROOT}/etc/grub.d/40_custom0" > "${CHROOT}/etc/grub.d/40_custom" - sed s/"$rootuid"/"$rootUUID"/ "${CHROOT}/boot/grub/grub.cfg0" > "${CHROOT}/boot/grub/grub.cfg" - rm -f "${CHROOT}/boot/grub/grub.cfg0" "${CHROOT}/etc/grub.d/40_custom0" - chmod ugo+x "${CHROOT}/etc/grub.d/40_custom" - grubconf=$(cat "${CHROOT}/boot/grub/grub.cfg") - LOGecho "grub config file: ${CHROOT}/boot/grub/grub.cfg
${grubconf}
" - "$dpath"/mkhome - label=$(labelfix "$obi_system") - [[ -z "$label" ]] && label="OBI" - tune2fs -L "$label" "$rootpart" - df -h "${CHROOT}" - - # are we using swap? - [[ -n "$swappart" ]] && swapon "$swappart" -p 3 - LOGecho "$(swapon -s)" - - blkid -c /dev/null - chroot "${CHROOT}" sync - ## configure the user - echo "70 #OBI progress">> "$tailfile" - user-config "${CHROOT}" - echo "80 #OBI progress">> "$tailfile" - # install the bootloader - LOGecho "$InstallingBootloader" - logVersion - #[[ -n "$swapUUID" ]] && "$dpath"/fstab-fixer "$rootpart" "$swapUUID" - saveLOG - [[ -z "${CHROOT}" ]] && CHROOT="/mnt" - # uh... what distro is installed? - DISTRO=$(chroot "${CHROOT}" bash -c "uname -a") - # customize the user's groups here - if [[ "${DISTRO/Debian}" != "${DISTRO}" ]] - then - hw-progress "${CHROOT}" - fi - MSG="${choose_this} ${device}" - grub-installer "$device" "${CHROOT}" "${MSG}" - echo "98 #OBI progress">> "$tailfile" - if [[ "$USEZENITY" == "true" ]] - then - zenity --question "$ZEN_ICON" --title="$ReadLog" --text="$ReadLog" - retval="$?" - else - dialog --title "$ReadLog" --yesno "$ReadLog" 10 30 - retval="$?" - fi - -case $retval in - 0) - if [[ "$USEZENITY" == "true" ]] - then - echo "">> "${HOME}"/obi-installer.log - zenity --class=OBI --text-info "$ZEN_ICON" --html --filename="${HOME}/obi-installer.log" - else - clear - removeHTMLtags "${HOME}/obi-installer.log" - if [[ -n "$(which xterm)" ]] - then - xterm -sb -rightbar -fa default -fg black -bg beige -fs 12 -geometry 80x32 -title "$LOGTITLE" -hold -e fold -sw 80 "${HOME}/obi-installer.log" & - else - logging=$(cat "${HOME}/obi-installer.log") - dialog --infobox "$logging" 0 0 - fi - fi - ;; - *);; -esac +#### this is another script + label=$(labelfix "$obi_system") + + [[ -z "$label" ]] && label="OBI" + tune2fs -L "$label" "$rootpart" + thisCHROOT=$(chrootDirectory "${thisCHROOT}") + df -h "${thisCHROOT}" +# uh... what distro is installed? + DISTRO=$(chrootCommand "${thisCHROOT}" "mkp" "uname -a") ## in obi-functions + if [[ "${DISTRO/Debian}" != "${DISTRO}" ]] + then +#### this is another script + hw-progress "${thisCHROOT}" + fi + progressTail "70" +# install the bootloader + LOG_ECHO "$InstallingBootloader" +## add a nice message of the current device to help users + MSG="${choose_this} ${device}" + +#### this is another script + grub-installer "$device" "${thisCHROOT}" "${MSG}" + + mount "${rootpart}" "${thisCHROOT}" + chmod ugo+x "${thisCHROOT}/etc/grub.d/40_custom" + grubconf="$( < ${thisCHROOT}/boot/grub/grub.cfg)" +## Log our grub config + if [[ "$USEZENITY" == "true" ]] + then + LOG_ECHO "grub config file: ${thisCHROOT}/boot/grub/grub.cfg
${grubconf}
" + else + LOG_ECHO "grub config file: ${thisCHROOT}/boot/grub/grub.cfg\n${grubconf}" + fi + #"$dpath"/mkhome + +# are we using swap? + [[ -n "$swappart" ]] && swapon "$swappart" -p 3 + LOG_ECHO "$(swapon -s)" + blkid -c /dev/null + +## sync the drive + chrootCommand "${thisCHROOT}" "mkp" "sync" ## in obi-functions + +## configure the user + progressTail "88" + +#### this is another script + user-config "${thisCHROOT}" + + logVersion + +## this used to be needed, so I'll leave it here for now... +#[[ -n "$swapUUID" ]] && "$dpath"/fstab-fixer "$rootpart" "$swapUUID" + saveLOG + progressTail "98" + +## do they want to read the log?? + if [[ "$USEZENITY" == "true" ]] + then + zenity --question "$ZEN_ICON" --title="$ReadLog" --text="$ReadLog" 2> /dev/null + retval="$?" + else + dialog --title "$ReadLog" --yesno "$ReadLog" 10 30 + retval="$?" + fi +## what did they choose? + case $retval in + 0) + if [[ "$USEZENITY" == "true" ]] + then + echo "">> "${HOME}"/obi-installer.html + zenity --class=OBI --text-info "$ZEN_ICON" --html --filename="${HOME}/obi-installer.html" 2> /dev/null + else + clear + removeHTMLtags "${HOME}/obi-installer.log" + if [[ -n "$(which xterm 2>/dev/null)" ]] && [[ "$TERM" != "linux" ]] + then + xterm -sb -rightbar -fa default -fg black -bg beige -fs 12 -geometry 80x32 -title "$LOGTITLE" -hold -e fold -sw 80 "${HOME}/obi-installer.log" & + else + dialog --textbox "${HOME}/obi-installer.log" 0 0 + fi + fi + ;; + *);; + esac # finish -echo "100 #OBI progress">> "$tailfile" - if [[ "$USEZENITY" == "true" ]] - then - zenity --class=OBI --question "$ZEN_ICON" --title="$RebootNow?" --text="$Theinstallationhasfinished\n $obi_system\n$device\n$Doyouwanttorebootinto $obi_system" - else - dialog --title "$RebootNow?" --clear \ + progressTail "100" + +## do they want to reboot??? + if [[ "$USEZENITY" == "true" ]] + then + zenity --class=OBI --question "$ZEN_ICON" --title="$RebootNow?" --text="$Theinstallationhasfinished\n $obi_system\n$device\n$Doyouwanttorebootinto $obi_system" 2> /dev/null + retval="$?" + else + dialog --title "$RebootNow?" --clear \ --yesno "$Theinstallationhasfinished\n $obi_system\n$device\n$Doyouwanttorebootinto $obi_system" 10 30 - fi - case $? in - 0) - clear - LOGecho "$RebootNow" - systemctl poweroff |shutdown -r now | reboot - ;; - 1) - LOGecho "$Notrebooting.";; - esac + retval="$?" + fi + +## what did they choose? + case $retval in + 0) + clear + LOG_ECHO "$RebootNow" + systemctl poweroff |shutdown -r now | reboot + ;; + 1)LOG_ECHO "$Notrebooting.";; + esac + return 0 +} + +## the common function for using fdisk +## ARGS +# 1 - function name for logging +# 2 - the device to use fdisk on +# 3 - the fdisk commands to use +mkfdisk(){ + functionName="$1" + shift + DEV="$1" + shift + fdiskMSG="$*" + LOG_ECHO "$functionName running fdisk on $DEV using: +$fdiskMSG" + echo "${fdiskMSG}"|fdisk -u "$DEV" +} + +## TODO: replace mkp* with this +## A catch all function for mklub in all the older mkp* functions +## ARGS +# 1 - chroot +# 2 - tarball +# 3 - device to install to +# 4 - format things true/false +# 5 - use swap true/false +# 6 - root partition +# 7 - swap partition +# 8 - home partition +makelub(){ + myCHROOT="$1" + [[ -z "$myCHROOT" ]] && return 1 + [[ -z "$obi_system" ]] && obi_system="$(getOBISystem)" + tarball="$2" + [[ -z "$tarball" ]] && return 2 + device="$3" + [[ -z "$device" ]] && return 3 + formatThings="$4" + formatThings="${formatThings,,}" + [[ -z "$formatThings" ]] && return 4 + useSWAP="$5" + useSWAP="${useSWAP,,}" + [[ -z "$useSWAP" ]] && return 5 + rootpart="$6" + [[ -z "$rootpart" ]] && rootpart="${device}1" + swappart="$7" + homepart="$8" + [[ "$useSWAP" == "true" ]] && [[ -z "$swappart" ]] && swappart="${device}2" + +## LOG our variables to examine later + + if [[ "$USEZENITY" == "true" ]] + then + LOG_ECHO "Starting makelub:
+chroot directory=$myCHROOT
+tarball=$tarball
+device=$device
+format things=$formatThings
+use swap=$useSWAP
+root partition=$rootpart
+swap partition=$swappart
" + else + LOG_ECHO "Starting makelub: +chroot directory=$myCHROOT +tarball=$tarball +device=$device +format things=$formatThings +use swap=$useSWAP +root partition=$rootpart +swap partition=$swappart" + fi + +## make sure we unmount things + forceUmount "$myCHROOT" +## get the swap size + swapsize "$device" +## total device sectors + sectors="$(getSectors $device)" +## needed swap size + swapsize="$(getSwapSize $device)" +## the sector size (to determine partition 1 start) + sectsize="$(getSectorSize $device)" + [[ -z "$sectsize" ]] && sectsize=0 +## where do we start the SWAP partition + swapstart=$((sectors-swapsize)) +## where do we start partition 1 + partition1Start=$((1024*1024/sectsize)) + +# variables + LC_ALL=C + LANG=C + +# swap off and unmount all partitions + swapoff "${device}"* 2>/dev/null + swapon -s + sleep 3 + umount --force "${device}"* + + + if [[ "$formatThings" == "true" ]] + then + sync + partprobe -s "$device" + + if [[ "$useSWAP" == "true" ]] + then +## FORMATTING FOR SWAP USAGE + formattingFDISK="o +n +p +2 +$swapstart + +n +p +1 +$partition1Start + +p +w +q +" + SfdiskCOM="${swappart} : start=$swapstart +${device}1 : start=$(partition1Start)" + else +## FORMATTING WHEN NOT USING SWAP + formattingFDISK="o +n +p +1 +$partition1Start + +p +w +q +" + SfdiskCOM="${rootpart} : start=$partition1Start" + fi +# make partitions USING SFDISK instead + sfdiskCommand "${device}" "${SfdiskCOM}" + sfdiskRetval="$?" + if (( sfdiskRetval != 0 )) + then + mkfdisk "makelub" "$device" "${formattingFDISK}" || echo "${formattingFDISK}"|fdisk -u "$device" + fi + fi + sync + + +# make file system + mkfs.ext4 "${rootpart}" + sync + +# mount what will be the root partition + mount "${rootpart}" "${myCHROOT}" + retval=$? + if (( retval != 0 )) + then + clearOBI + ECHO "$mountofwhatshouldbecometherootpartitionfailed: ${rootpart}" + exit 1 + fi + if [[ "$useSWAP" == "true" ]] + then + suidblkid=$(blkid -c /dev/null|grep "$swappart"|grep 'TYPE="swap"') + retval=$? + LOG_ECHO "[makelub] blkid for $swappart = $suidblkid (if exists)" + if (( retval == 0 )) + then + LOG_ECHO "$Useexistingswappartition $swappart - $keepitsUUID" + swapoff "$swappart" + else + LOG_ECHO "$Makeaswappartition $swappart - $andgetnewUUID" + mkswap "$swappart" + fi + swapUUID=$(getUUID "${swappart}") + if [[ -z "${swapUUID}" ]] + then + swapUUID=$(blkid "${swappart}"|sed -e 's/.*UUID="//' -e 's/".*//') + fi + else + if [[ "$formatThings" != "true" ]] + then + unset swapUUID swappart + fi + fi + tarballExtractor "$myCHROOT" "$tarball" + finishUp "${myCHROOT}" "$device" "$rootpart" "$swapUUID" "$swappart" +} + +## replacement for mkp1 +# ARGS +# 1 - tarball +# 2 - device +# 3 - chroot directory +make1p(){ + tarball="$1" + device="$2" + thatCHROOT="$3" + makelub "${thatCHROOT}" "$tarball" "$device" "TRUE" "FALSE" "${device}1" +} + +## replacement for mkp2p1 +# ARGS +# 1 - tarball +# 2 - device +# 3 - chroot directory +make2p(){ + tarball="$1" + device="$2" + thatCHROOT="$3" + makelub "${thatCHROOT}" "$tarball" "$device" "TRUE" "TRUE" "${device}1" "${device}2" + +} + +## replacement for mkpxpy +# ARGS +# 1 - tarball +# 2 - device +# 3 - chroot directory +# 4 - root partition +# 5 - swap partition +makepXpY(){ + tarball="$1" + device="$2" + thatCHROOT="$3" + rootdev="$4" + swapdev="$5" + +##Save these variables to the logfile for examination later + LOG_ECHO "$obi_system\n$tarball\n$device" + swapping="TRUE" +## check if swap partition exists... if not... NO swap + if [[ -z "$swapdev" ]] + then + swapping="FALSE" + fi + + makelub "${thatCHROOT}" "$tarball" "$device" "TRUE" "$swapping" "$rootdev" "$swapdev" + } diff -Nru obi-installer-3.3.0ubuntu0/OBI/mkp1 obi-installer-3.4.0ubuntu0/OBI/mkp1 --- obi-installer-3.3.0ubuntu0/OBI/mkp1 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/mkp1 2018-03-15 13:13:10.000000000 +0000 @@ -1,59 +1,69 @@ #!/bin/bash -. gettext.sh +eval_gettext(){ + echo -e "$*" +} +source gettext.sh export TEXTDOMAIN=obi-installer + ########################################################### mountofwhatshouldbecometherootpartitionfailed=$(eval_gettext "mount of what should become the root partition failed") -## please leave swap and /mnt/etc/fstab -swappartitionsinfstabshouldbe0fortheOBI=$(eval_gettext "swap partitions in /mnt/etc/fstab, should be 0 for the OBI") -# extracting tarball -OneButtonInstaller=$(eval_gettext "One Button Installer") ########################################################### -USEZENITY="FALSE" -[[ -f "$HOME/usezenity" ]] && USEZENITY=$(cat "$HOME/usezenity") -ICONPATH="/usr/share/icons/hicolor/48x48/apps/obi-window-icon.png" -ZEN_ICON="--window-icon=$ICONPATH" -echoout() { - if [[ "$USEZENITY" == "true" ]] - then - zenity --class=OBI --info --timeout=7 --title="$OneButtonInstaller" "$ZEN_ICON" --text="$*" - echo -e "
[mkp1]
$*" >> "${HOME}"/obi-installer.log - else - dialog --infobox "$*" 0 0 - sleep .7 - echo -e "[mkp1] $*" >> "${HOME}"/obi-installer.log - fi + + +################################################ +## Source our handy functions!! +## make sure they are in the PATH first +OBI_SHARE_DIR="/usr/share/OBI" +if [[ -d "${OBI_SHARE_DIR}" ]] && [[ "${PATH/$OBI_SHARE_DIR}" == "${PATH}" ]] +then + PATH="${PATH}:/usr/share/OBI" + export PATH +elif [[ "${PATH/$PWD}" == "${PATH}" ]] +then + PATH="${PATH}:${PWD}" + export PATH +fi +source obi-functions || exit +################################################ +ECHOout() { + echoOut "mkp1" "$*" ## in obi-functions } -LOGecho(){ - if [[ "$USEZENITY" == "true" ]] - then - echo -e "
[mkp1]
$*" >> "${HOME}"/obi-installer.log - else - echo -e "[mkp1] $*" >> "${HOME}"/obi-installer.log - fi +LOG_echo(){ + echoLOG "mkp1" "$*" ## in obi-functions } mklub() { -[[ -z "${CHROOT}" ]] && CHROOT="/mnt" -source mkp -obi_system="$1" -[[ -z "$obi_system" ]] && LOGecho "[mkp1] obi system name is empty" -tarball="$2" -device="$3" -swapsize "$device" -forceUmount + +################################################ +## Source our handy functions!! + source mkp || ErrorExit "mkp1" "$?" "Failed to source mkp" +################################################ + CHROOT="$1" + obi_system="$2" + [[ -z "$obi_system" ]] && LOG_echo "[mkp1] obi system name is empty" && return 1 + tarball="$3" + device="$4" + + swapsize "$device" + forceUmount # variables -LC_ALL=C -LANG=C + LC_ALL=C + LANG=C # swap off and unmount all partitions -swapoff "${device}"* 2>/dev/null -swapon -s -sleep 3 -umount --force "${device}"* -[[ -z "$sectsize" ]] && sectsize=0 -# make partitions -LOGecho "fdisk -u $device" -echo "o + swapoff "${device}"* 2>/dev/null + swapon -s + sleep 3 + umount --force "${device}"* + sectsize="$(getSectorSize $device)" + +# make partitions USING SFDISK instead + SfdiskCOM="${device}1 : start=$((1024*1024/sectsize))" + sfdiskCommand "${device}" "${SfdiskCOM}" + sfdiskRetval="$?" + if (( sfdiskRetval != 0 )) + then + formattingFDISK="o n p 1 @@ -62,26 +72,29 @@ p w q -"|fdisk -u "$device" - -sync -partprobe -s "$device" -sync +" + mkfdisk "mkp1" "$device" "${formattingFDISK}" + fi + + sync + partprobe -s "$device" + sync # make file system -mkfs.ext4 "${device}1" -sync + mkfs.ext4 "${device}1" + sync # mount what will be the root partition -mount "${device}1" "${CHROOT}" -retval=$? -if (( retval != 0 )) -then - clearOBI - echoout "$mountofwhatshouldbecometherootpartitionfailed: ${device}1" - exit 1 -fi - -extract_tarball "$tarball" -finishIT "${device}1" + mount "${device}1" "${CHROOT}" + retval=$? + if (( retval != 0 )) + then + clearOBI + ECHOout "$mountofwhatshouldbecometherootpartitionfailed: ${device}1" + exit 1 + fi + + extract_tarball "$tarball" + finishUp "${CHROOT}" "$device" "${device}1" + return $? } diff -Nru obi-installer-3.3.0ubuntu0/OBI/mkp2p1 obi-installer-3.4.0ubuntu0/OBI/mkp2p1 --- obi-installer-3.3.0ubuntu0/OBI/mkp2p1 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/mkp2p1 2018-03-15 13:13:10.000000000 +0000 @@ -1,63 +1,77 @@ #!/bin/bash -. gettext.sh +eval_gettext(){ + echo -e "$*" +} +source gettext.sh export TEXTDOMAIN=obi-installer + ########################################################### mountofwhatshouldbecometherootpartitionfailed=$(eval_gettext "mount of what should become the root partition failed") -OneButtonInstaller=$(eval_gettext "One Button Installer") ########################################################### -USEZENITY="FALSE" -[[ -f "$HOME/usezenity" ]] && USEZENITY=$(cat "$HOME/usezenity") -ICONPATH="/usr/share/icons/hicolor/48x48/apps/obi-window-icon.png" -ZEN_ICON="--window-icon=$ICONPATH" -echoout() { - if [[ "$USEZENITY" == "true" ]] - then - zenity --class=OBI --info --timeout=7 --title="$OneButtonInstaller" "$ZEN_ICON" --text="$*" - echo -e "
[mkp2p1]
$*" >> "${HOME}"/obi-installer.log - else - dialog --infobox "$*" 0 0 - sleep .7 - echo -e "[mkp2p1] $*" >> "${HOME}"/obi-installer.log - fi + +################################################ +## Source our handy functions!! +## make sure they are in the PATH first +OBI_SHARE_DIR="/usr/share/OBI" +if [[ -d "${OBI_SHARE_DIR}" ]] && [[ "${PATH/$OBI_SHARE_DIR}" == "${PATH}" ]] +then + PATH="${PATH}:/usr/share/OBI" + export PATH +elif [[ "${PATH/$PWD}" == "${PATH}" ]] +then + PATH="${PATH}:${PWD}" + export PATH +fi +source obi-functions || exit +################################################ +ECHOout() { + echoOut "mkp2p1" "$*" ## in obi-functions } -LOGecho(){ - if [[ "$USEZENITY" == "true" ]] - then - echo -e "
[mkp2p1]
$*" >> "${HOME}"/obi-installer.log - else - echo -e "[mkp2p1] $*" >> "${HOME}"/obi-installer.log - fi +LOG_echo(){ + echoLOG "mkp2p1" "$*" ## in obi-functions } mklub() { - [[ -z "${CHROOT}" ]] && CHROOT="/mnt" - source mkp - obi_system="$1" - [[ -z "$obi_system" ]] && LOGecho "[mkp2p1] obi system name is empty" - tarball="$2" - device="$3" - forceUmount - swapsize "$device" - LC_ALL=C - LANG=C -# rid of errors - [[ -z "$sectors" ]] && sectors=0 - [[ -z "$swapsize" ]] && swapsize=0 - [[ -z "$sectsize" ]] && sectsize=0 - if (( sectors == 0 )) && (( swapsize == 0 )) && (( sectsize == 0 )) - then - LOGecho "Zero length sectors, swapsize and sector size... something went wrong." - clearOBI - fi - swapstart=$((sectors-swapsize)) - swapoff "${device}"* 2>/dev/null - swapon -s - sleep 3 - umount --force "${device}"* - LOGecho "umount --force ${device}*" - ## BEGIN FDISK - echo "fdisk -u $device" - echo "o +################################################ +## Source our handy functions!! + source mkp || ErrorExit "mkp2p1" "$?" "Failed to source mkp" +################################################ + CHROOT="$1" + obi_system="$2" + [[ -z "$obi_system" ]] && LOG_echo "[mkp2p1] obi system name is empty" && return 1 + tarball="$3" + device="$4" + + forceUmount + swapsize "$device" + LC_ALL=C + LANG=C + sectors="$(getSectors $device)" + swapsize="$(getSwapSize $device)" + sectsize="$(getSectorSize $device)" + if (( sectors == 0 )) && (( swapsize == 0 )) && (( sectsize == 0 )) + then + LOG_echo "Zero length sectors, swapsize and sector size... something went wrong." + clearOBI + fi + swapstart=$((sectors-swapsize)) + swapoff "${device}"* 2>/dev/null + swapon -s + sleep 3 + umount --force "${device}"* + LOG_echo "umount --force ${device}*" + +## SFDISK +## ${device}2 : start= $swapstart, size=+, type=S +## ${device}1 : start= $((1024*1024/sectsize)), size=+, type=L + SfdiskCOM="${device}2 : start=$swapstart +${device}1 : start=$((1024*1024/sectsize))" +# make partitions USING SFDISK instead + sfdiskCommand "${device}" "${SfdiskCOM}" + sfdiskRetval="$?" + if (( sfdiskRetval != 0 )) + then + formattingFDISK="o n p 2 @@ -71,39 +85,42 @@ p w q -"|fdisk -u "$device" - - sync - partprobe -s "$device" - sync +" + mkfdisk "mkp2p1" "$device" "${formattingFDISK}" + fi + + sync + partprobe -s "$device" + sync -# make file system +# make ext4 file system - mkfs.ext4 "${device}1" - sync + mkfs.ext4 "${device}1" + sync # mount what will be the root partition - mount "${device}1" "${CHROOT}" - retval=$? + mount "${device}1" "${CHROOT}" + retval=$? - if (( retval != 0 )) - then - echoout "$mountofwhatshouldbecometherootpartitionfailed: ${device}1" - clearOBI - exit - fi - - extract_tarball "$tarball" - mkswap "${device}2" - - swapuid=$(grep ^UUID "${CHROOT}/etc/fstab"|grep swap|sed -e s/\ .*// -e 's/UUID=//') - RELEASE=$(chroot "${CHROOT}" bash -c "lsb_release -a | grep Codename:| sed 's/.*\t//'") - if [[ "${RELEASE}" == "precise" ]] - then - swapUUID=$(blkid "${device}2"|sed -e 's/.*UUID="//' -e 's/".*//') - else - swapUUID=$(blkid "${device}2"|sed -e 's/.* UUID="//' -e 's/".*//') - fi + if (( retval != 0 )) + then + ECHOout "$mountofwhatshouldbecometherootpartitionfailed: ${device}1" + clearOBI + exit + fi + +## extract the tarball + extract_tarball "$tarball" + +## make the swap device + mkswap "${device}2" + + swapUUID=$(getUUID "${device}2") + if [[ -z "${swapUUID}" ]] + then + swapUUID=$(blkid "${device}2"|sed -e 's/.*UUID="//' -e 's/".*//') + fi - finishIT "${device}1" "$swapUUID" "${device}2" + finishUp "${CHROOT}" "$device" "${device}1" "$swapUUID" "${device}2" + return $? } diff -Nru obi-installer-3.3.0ubuntu0/OBI/mkpxpy obi-installer-3.4.0ubuntu0/OBI/mkpxpy --- obi-installer-3.3.0ubuntu0/OBI/mkpxpy 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/mkpxpy 2018-03-15 13:13:10.000000000 +0000 @@ -1,5 +1,8 @@ #!/bin/bash -. gettext.sh +eval_gettext(){ + echo -e "$*" +} +source gettext.sh export TEXTDOMAIN=obi-installer ########################################################### mountofwhatshouldbecometherootpartitionfailed=$(eval_gettext "mount of what should become the root partition failed") @@ -7,106 +10,108 @@ keepitsUUID=$(eval_gettext "keep its UUID") Makeaswappartition=$(eval_gettext "Make a swap partition") andgetnewUUID=$(eval_gettext "and get new UUID") -OneButtonInstaller=$(eval_gettext "One Button Installer") ########################################################### -USEZENITY="FALSE" -[[ -f "$HOME/usezenity" ]] && USEZENITY=$(cat "$HOME/usezenity") -ICONPATH="/usr/share/icons/hicolor/48x48/apps/obi-window-icon.png" -ZEN_ICON="--window-icon=$ICONPATH" -echoout() { - if [ "$USEZENITY" == "true" ] - then - zenity --class=OBI --info --timeout=7 --title="$OneButtonInstaller" "$ZEN_ICON" --text="$*" - echo -e "
[mkpxpy]
$*" >> "${HOME}"/obi-installer.log - else - dialog --infobox "$*" 0 0 - sleep .7 - echo -e "[mkpxpy] $*" >> "${HOME}"/obi-installer.log - fi + +################################################ +## Source our handy functions!! +## make sure they are in the PATH first +OBI_SHARE_DIR="/usr/share/OBI" +if [[ -d "${OBI_SHARE_DIR}" ]] && [[ "${PATH/$OBI_SHARE_DIR}" == "${PATH}" ]] +then + PATH="${PATH}:/usr/share/OBI" + export PATH +elif [[ "${PATH/$PWD}" == "${PATH}" ]] +then + PATH="${PATH}:${PWD}" + export PATH +fi +source obi-functions || exit +################################################ +ECHOout() { + echoOut "mkpxpy" "$*" ## in obi-functions } -LOGecho(){ - if [ "$USEZENITY" == "true" ] - then - echo -e "
[mkpxpy]
$*" >> "${HOME}"/obi-installer.log - else - echo -e "[mkpxpy] $*" >> "${HOME}"/obi-installer.log - fi +LOG_echo(){ + echoLOG "mkpxpy" "$*" ## in obi-functions } mklub() { -[[ -z "${CHROOT}" ]] && CHROOT="/mnt" -source mkp +################################################ +## Source our handy functions!! + source mkp || ErrorExit "mkpxpy" "$?" "Failed to source mkp" +################################################ + # variables -LC_ALL=C -LANG=C -swapping=true -# system and partitions + LC_ALL=C + LANG=C + swapping=true -obi_system="$1" -[[ -z "$obi_system" ]] && LOGecho " [mkpxpy] obi system name is empty" -tarball="$2" -rootpart="$3" -swappart="$4" + +# system and partitions + CHROOT="$1" + obi_system="$2" + [[ -z "$obi_system" ]] && LOG_echo "[mkxpy] obi system name is empty" && return 1 + tarball="$3" + rootpart="$4" + swappart="$5" ##Save these variables to the logfile for examination later -LOGecho "$obi_system\n$tarball\n$device" + LOG_echo "$obi_system\n$tarball\n$device" ## check if swap partition exists... if not... NO swap -if [[ -z "$swappart" ]] -then - swapping=false -fi + if [[ -z "$swappart" ]] + then + swapping=false + fi ## mkp function to unmount the device -forceUmount + forceUmount # make file system -mkfs.ext4 "$rootpart" -sync + mkfs.ext4 "$rootpart" + sync # mount what will be the root partition to the chroot -mount "$rootpart" "${CHROOT}" -retval=$? -if (( retval != 0 )) -then - echoout "$mountofwhatshouldbecometherootpartitionfailed: $rootpart" - clearOBI - exit -fi + mount "$rootpart" "${CHROOT}" + retval=$? + if (( retval != 0 )) + then + ECHOout "$mountofwhatshouldbecometherootpartitionfailed: $rootpart" + clearOBI + exit + fi ## this is sourced from mkp -extract_tarball "$tarball" + extract_tarball "$tarball" # match the UUIDs to the fstab in the tarball and activate the swap -export device="${rootpart:0:8}" - -if $swapping -then - -## what is this stored in a variable for?? - suidblkid=$(blkid -c /dev/null|grep "$swappart"|grep 'TYPE="swap"') - retval=$? - LOGecho "[mkpxpy] blkid for $swappart = $suidblkid (if exists)" - if (( retval == 0 )) - then - LOGecho "$Useexistingswappartition $swappart - $keepitsUUID" - swapoff "$swappart" - else - LOGecho "$Makeaswappartition $swappart - $andgetnewUUID" - mkswap "$swappart" - fi - RELEASE=$(chroot "${CHROOT}" bash -c "lsb_release -a | grep Codename:| sed 's/.*\t//'") - if [[ "${RELEASE}" == "precise" ]] - then - swapUUID=$(blkid "$swappart"|sed -e 's/.*UUID="//' -e 's/".*//') - else - swapUUID=$(blkid "$swappart"|sed -e 's/.* UUID="//' -e 's/".*//') - fi -else - unset swapUUID swappart -fi + device="${rootpart:0:8}" + export device + if $swapping + then +## Log this variable + suidblkid=$(blkid -c /dev/null|grep "$swappart"|grep 'TYPE="swap"') + retval=$? + LOG_echo "[mkpxpy] blkid for $swappart = $suidblkid (if exists)" + if (( retval == 0 )) + then + LOG_echo "$Useexistingswappartition $swappart - $keepitsUUID" + swapoff "$swappart" + else + LOG_echo "$Makeaswappartition $swappart - $andgetnewUUID" + mkswap "$swappart" + fi + + swapUUID=$(getUUID "$swappart") + if [[ -z "${swapUUID}" ]] + then + swapUUID=$(blkid "$swappart"|sed -e 's/.*UUID="//' -e 's/".*//') + fi + else + unset swapUUID swappart + fi ## this is sourced from mkp # this will automatically changed based on the variabls sent it... if we send in swap variables that are zero length it will ignore them. -finishIT "$rootpart" "$swapUUID" "$swappart" + finishUp "${CHROOT}" "$device" "$rootpart" "$swapUUID" "$swappart" + return $? } diff -Nru obi-installer-3.3.0ubuntu0/OBI/obi obi-installer-3.4.0ubuntu0/OBI/obi --- obi-installer-3.3.0ubuntu0/OBI/obi 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/obi 2018-03-15 13:13:10.000000000 +0000 @@ -1,5 +1,8 @@ #! /bin/bash -. gettext.sh +eval_gettext(){ + echo -e "$*" +} +source gettext.sh export TEXTDOMAIN=obi-installer ########################################################### RunthisasROOT=$(eval_gettext "Run this as ROOT") @@ -12,109 +15,142 @@ OneButtonInstaller=$(eval_gettext "One Button Installer") PROGRESS=$(eval_gettext "Progress") ########################################################### -USEZENITY="FALSE" -[[ -f "$HOME/usezenity" ]] && USEZENITY="$( < $HOME/usezenity)" -ICONPATH="/usr/share/icons/hicolor/48x48/apps/obi-window-icon.png" +obi_system="$1" +tarball="$2" +CHROOT="$3" +################################################ +## Source our handy functions!! +## make sure they are in the PATH first +OBI_SHARE_DIR="/usr/share/OBI" +if [[ -d "${OBI_SHARE_DIR}" ]] && [[ "${PATH/$OBI_SHARE_DIR}" == "${PATH}" ]] +then + PATH="${PATH}:/usr/share/OBI" + export PATH +elif [[ "${PATH/$PWD}" == "${PATH}" ]] +then + PATH="${PATH}:${PWD}" + export PATH +fi +source obi-functions || exit +################################################ +[[ -z "$USEZENITY" ]] && USEZENITY="$(getZenity)" +ICONPATH="$(getIcon)" ZEN_ICON="--window-icon=$ICONPATH" -echoout() { - if [[ "$USEZENITY" == "true" ]] - then - zenity --class=OBI --info --timeout=7 --title="$OneButtonInstaller" "$ZEN_ICON" --text="$*" - echo -e "
[obi]
$*" >> "${HOME}"/obi-installer.log - else - dialog --infobox "$*" 0 0 - sleep .7 - echo -e "[obi] $*" >> "${HOME}"/obi-installer.log - fi +CHROOT=$(chrootDirectory "${CHROOT}") +## wrapper for obi-functions +ECHO() { + echoOut "obi" "$*" } -LOGecho(){ - if [[ "$USEZENITY" == "true" ]] - then - echo -e "
[obi]
$*" >> "${HOME}"/obi-installer.log - else - echo -e "[obi] $*" >> "${HOME}"/obi-installer.log - fi +LOG_ECHO(){ + echoLOG "obi" "$*" } +EXIT_WITH_ERROR(){ + unset retval MSG + retval="$1" + shift + MSG="$*" + ErrorExit "obi" "$retval" "${MSG}" +} + +## find the tarball +if [[ -z "${tarball}" ]] +then + selected="$(selector_of_tarball_dir)" + tarball=$( < "${selected}") +fi + +## get the PID of zenity getZenityPID(){ - ARG="$1" - IFS=" + ARG="$1" + local IFS=" " - ARRAY=($(pgrep -la zenity)) - for i in "${ARRAY[@]}" - do - if [[ "${i/$ARG}" != "${i}" ]] - then - result="${i/ *}" - fi - done - echo "$result" + ARRAY=($(pgrep -la zenity)) + for i in "${ARRAY[@]}" + do + if [[ "${i/$ARG}" != "${i}" ]] + then + result="${i/ *}" + fi + done + echo "$result" } # usage if [[ "$(whoami)" != "root" ]] then - echoout "$Usage:\n$InstalloperatingsystemwiththeOneButtonInstaller\nsudo $0\n\n$RunthisasROOT" - exit + ECHO "$Usage:\n$InstalloperatingsystemwiththeOneButtonInstaller\nsudo $0\n\n$RunthisasROOT" + exit fi -source functions || exit -[[ -z "$dpath" ]] && dpath=$(getDpath) -curdir="$dpath" +[[ -z "$dpath" ]] && dpath="$(getDpath)" ## check the tarball -TARBALLfile=$(getTarballFile) +TARBALLfile="$(getTarballFile)" [[ -z "$TARBALLfile" ]] && "$dpath"/dltbl export PATH=$PATH:$dpath -tailfile="${HOME}"/.obi-progress -[[ -z "$obi_system" ]] && obi_system="$( < $HOME/OSname)" +tailfile="$(getTailFile)" +obilevel="$dpath/obilevel" +## check for advanced OBI level +if [[ -s "$obilevel" ]] +then +## shorten this by using the < builtin and a comapare + [[ $( < "$obilevel") == "advanced" ]] && advanced=true +fi + +## zenity progress dialog +# this relies on the 'progressTail' function in obi-functions to change progress if [[ "$USEZENITY" == "true" ]] then - # full progress - width=360 - height=80 - ( tail -f "$tailfile" |zenity --class=OBI --progress --title="$OneButtonInstaller - $PROGRESS" --width="$width" --height="$height" --text="$OneButtonInstaller - $PROGRESS" --percentage=0 --auto-close --no-cancel "$ZEN_ICON" 2>> "/dev/null") & - pid=$(getZenityPID "$PROGRESS") - [[ -z "${pid}" ]] && pid="$(pgrep -n zenity)" - [[ -n "${pid}" ]] && LOGecho "Found pid for Zenity in obi: $pid" && echo "$pid" > "$HOME"/.pid - [[ -z "${pid}" ]] && LOGecho "Didn't find pid for zenity window for overall progress" - pid1="$(pgrep -n tail)" - echo "$pid1" >> "$HOME"/.pid - pid2="$(pgrep obi)" - echo "$pid2" >> "$HOME"/.pid - dpath="$(getDpath)/" - "$dpath"/position_win "$pid" "$width" "$height" + width=360 + height=80 + ( tail -f "$tailfile" |zenity --class=OBI --progress --title="$OneButtonInstaller - $PROGRESS" --width="$width" --height="$height" --text="$OneButtonInstaller - $PROGRESS" --percentage=0 --auto-close --no-cancel "$ZEN_ICON" 2>/dev/null) & + pid=$(getZenityPID "$PROGRESS") + [[ -z "${pid}" ]] && pid="$(pgrep -n zenity)" + [[ -n "${pid}" ]] && LOG_ECHO "Found pid for Zenity in obi: $pid" && echo "$pid" > "$HOME"/.pid + [[ -z "${pid}" ]] && LOG_ECHO "Didn't find pid for zenity window for overall progress" + pid1="$(pgrep -n tail)" + echo "$pid1" >> "$HOME"/.pid + pid2="$(pgrep obi)" + echo "$pid2" >> "$HOME"/.pid + dpath="$(getDpath)/" + "$dpath"/position_win "$pid" "$width" "$height" fi -## functions are sourced from other files -source mkctrl || exit -source labelfix || exit +## mkctrl is sourced from the file +source "$dpath"/mkctrl || EXIT_WITH_ERROR "$?" "Failed to source mkctrl" + +#source "$dpath"/labelfix || EXIT_WITH_ERROR "$?" "Failed to source labelfix" +## ensure the system pretty name exists +[[ -z "$obi_system" ]] && obi_system="$(getOBISystem)" # select partitioning -mkctrl -echo "5 #OBI progress">> "$tailfile" +mkctrl "$obi_system" "$tarball" || EXIT_WITH_ERROR "$?" "mkctrl failed to setup the install" +progressTail "5" dialogMESSAGE="$SelectedTarball: $tarball" + +## TODO: use makelub instead of these at some point if $advanced then - dialogMESSAGE="${dialogMESSAGE}\n$selecting mkpxpy ($withswap)" - source mkpxpy || exit + dialogMESSAGE="${dialogMESSAGE}\n$selecting mkpxpy ($withswap)" + source "$dpath"/mkpxpy || EXIT_WITH_ERROR "$?" "Failed to source mkpxpy" elif [[ "$tarball" == "${tarball/noswap}" ]] && [[ -n "${tarball}" ]] then - dialogMESSAGE="${dialogMESSAGE}\n$selecting mkp2p1 ($withswap)" - source mkp2p1 || exit + dialogMESSAGE="${dialogMESSAGE}\n$selecting mkp2p1 ($withswap)" + source "$dpath"/mkp2p1 || EXIT_WITH_ERROR "$?" "Failed to source mkp2p1" else - dialogMESSAGE="${dialogMESSAGE}\n$selecting mkp1 ($withoutswap)" - source mkp1 || exit + dialogMESSAGE="${dialogMESSAGE}\n$selecting mkp1 ($withoutswap)" + source "$dpath"/mkp1 || EXIT_WITH_ERROR "$?" "Failed to source mkp1" fi ## main program is sourced from another file -LOGecho "${dialogMESSAGE}" +LOG_ECHO "${dialogMESSAGE}" if $advanced then - source confirm-partition || exit + source "$dpath"/confirm-partition || EXIT_WITH_ERROR "$?" "Failed to source confirm-partition" else - source select-device || exit + source "$dpath"/select-device "$CHROOT" || EXIT_WITH_ERROR "$?" "Failed to source select-device" fi diff -Nru obi-installer-3.3.0ubuntu0/OBI/obi-functions obi-installer-3.4.0ubuntu0/OBI/obi-functions --- obi-installer-3.3.0ubuntu0/OBI/obi-functions 1970-01-01 00:00:00.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/obi-functions 2018-03-15 13:13:10.000000000 +0000 @@ -0,0 +1,1415 @@ +#!/bin/bash +eval_gettext(){ + echo -e "$*" +} +source gettext.sh +export TEXTDOMAIN=obi-installer +########################################################### +PressEntertocontinue=$(eval_gettext "Press Enter to continue") +Errorfindingthetarballpathsoitwasmadeat=$(eval_gettext "Error finding the tarball path so it was made at") +Helpinfotoselectdrive=$(eval_gettext "Help info to select drive") +OK=$(eval_gettext "OK") +keystoscrollthishelpinfo=$(eval_gettext "Use Arrow PgUp PgDn Home End keys to scroll this help info") +SelectDevice=$(eval_gettext "Select device") +warningandoverview=$(eval_gettext "warning and overview") +## please leave \n and \Zn and \Z1 \n is a new line, \Z1 and \Zn make text BOLD +NEEDbootDEV=$(eval_gettext "You NEED to choose a device for the bootloader") +Unmountthetargetdeviceifmounted=$(eval_gettext ": the device will be completely overwritten\Zn\nGet more help to select device at the Starter menu\n\Z1Unmount the target device if mounted") +WARNING=$(eval_gettext "WARNING") +## HotKey for: "toggle USB-only" +answer_u=$(eval_gettext "u") +toggleUSBonly=$(eval_gettext "toggle USB-only") +showalldrives=$(eval_gettext "show all drives") +hideotherdrives=$(eval_gettext "hide other drives") +quitinstalling=$(eval_gettext "quit installing") +andContinue=$(eval_gettext "and continue") +Pleaseselectadevicewiththearrowkeys=$(eval_gettext "Please select a device with the arrow keys, scroll if necessary") +Go=$(eval_gettext "Go") +## Hotkey for: "Quit" +ans_q=$(eval_gettext "q") +Quit=$(eval_gettext "Quit") +wiping=$(eval_gettext "wiping") +## please leave \n this is a new line character +installingtheoperatingsystem=$(eval_gettext "installing\n\nthe operating system") +FINALWARNING=$(eval_gettext "FINAL WARNING") +beforewipingandinstalling=$(eval_gettext "before wiping and installing !!!\nDo you really want to wipe and install to this device?") +##SPACEBAR and SLASH are keyboard keys +SPACEBARSLASH=$(eval_gettext "SPACEBAR: copy selection to text-entry box, SLASH: show directory content") +Selectsourcefile=$(eval_gettext "Select source file") +normalfiletypefilter=$(eval_gettext "normal, file type filter") +Findisoandimagefiles=$(eval_gettext "Find and select among iso and image files, or with a general selector.") +## please leave \n and \Zn and \Z1 \n is a new line, \Z1 and \Zn make text BOLD +Increasethesizeoftheterminalwindow=$(eval_gettext "Increase the size of the terminal window, particularly the width!\Zn\nThen the menus to 'select file' work better to show long file names.\n\n\Z1Avoid spaces and special characters in directory and file names!") +## please leave \n and \Zn and \Z1 \n is a new line, \Z1 and \Zn make text BOLD +Avoidspacesandspecialcharacters=$(eval_gettext "Avoid spaces and special characters in directory and file names!\Zn\nUse a high resolution screen, if possible more than 80 characters wide!\nThen the menus to 'select file' work better to show long file names.\n\n\Z1Type text in the bottom text box!\Zn Use the upper text box(es) only to\npaste text into the bottom window (with the space key). The slash key\ncan be used to 'finish' moving to another directory.") +selectactionwithletterorarrow=$(eval_gettext "Please select an action with a letter key or the arrow keys") +nosearchforlinkedfiles=$(eval_gettext "iso and image file selector (easy), no search for linked files") +## Hotkey for: "iso and image file selector (easy), no search for linked files" +ans_s=$(eval_gettext "s") +includeLinkedfiles=$(eval_gettext "iso and image file selector (easy), include Linked files (may fail)") +## Hotkey for: "iso and image file selector (easy), include Linked files (may fail)" +ans_l=$(eval_gettext "l") +GeneralFileselector=$(eval_gettext "General File selector") +## Hotkey for: "General File selector" +ans_g=$(eval_gettext "g") +Amongfilesselecteddirectory=$(eval_gettext "Among files in the previously selected directory tree,\nselect file type to display") +Selectfiletypetodisplay=$(eval_gettext "Select file type to display") +## Hotkey for: "all files suitable as source files" +ans_a=$(eval_gettext "a") +allfilessuitable=$(eval_gettext "all files suitable as source files") +## ISO is a file format for CD images +## Hotkey for: "only ISO files" +ans_iso=$(eval_gettext "i") +onlyISOfiles=$(eval_gettext "only ISO files") +## Hotkey for: "only image files (with and without compression)" +ans_m=$(eval_gettext "m") +onlyimagefiles=$(eval_gettext "only image files (with and without compression)") +Doyouwanttoinstallit=$(eval_gettext "Do you want to install it?") +TheprogramPV=$(eval_gettext "The program 'pv' can show the progress during the installation.") +Preparesystemuptodate=$(eval_gettext "Prepare by making the system up to date") +butitisnotinstalled=$(eval_gettext "however, it is not installed.") +Bootedfrom=$(eval_gettext "Booted from") +Availabledevices=$(eval_gettext "Available devices") +Hotkey=$(eval_gettext "Hotkey") +thetargetwillbe=$(eval_gettext "The target device will be:") +TARGET=$(eval_gettext "Target Device:") +OneButtonInstaller=$(eval_gettext "One Button Installer") +Checkthisboxifyouarereadytogo=$(eval_gettext "Click this if you are ready to go") +ErrorfindingtheOBIselectedpath=$(eval_gettext "Error finding the OBI selected path") +ScriptnotfoundChangedirectory=$(eval_gettext "Script not found. Change directory")\ +########################################################### + +## get the tail file used in obi progress +getTailFile(){ + [[ -z "$TailFile" ]] && TailFile="${HOME}/.obi-progress" && export TailFile + echo "$TailFile" + return 0 +} +[[ -z "$TailFile" ]] && TailFile="$(getTailFile)" && export TailFile + +## this is used to tail progress for the zenity progress indicator +progressTail(){ + unset value + value="$1" + [[ -z "$value" ]] && return 1 + [[ -z "$TailFile" ]] && TailFile="$(getTailFile)" && export TailFile + echo "$value #OBI progress" >> "${TailFile}" + return 0 +} +## return 0 for small 1 for big +bigOrSmall(){ +##TODO + return 0 +} +## determine if we are/can use zenity +getZenity(){ + if [[ -z "$DISPLAY" ]] + then + unset USEZENITY + [[ -f "$HOME/usezenity" ]] && rm "$HOME/usezenity" 2>/dev/null + return + fi + if [[ -z "$USEZENITY" ]] + then + [[ -f "$HOME/usezenity" ]] && USEZENITY="$( < $HOME/usezenity)" + [[ -z "$USEZENITY" ]] && USEZENITY="NO" + USEZENITY="${USEZENITY,,}" + export USEZENITY + fi + echo "$USEZENITY" + return 0 +} +[[ -z "$USEZENITY" ]] && USEZENITY="$(getZenity)" && export USEZENITY + +## get the pretty name for the tarball to use in the install menu +getOBISystem(){ + [[ -z "$obi_system" ]] && [[ -f "$HOME/OSname" ]] && obi_system="$( < $HOME/OSname)" && export obi_system + echo "$obi_system" + return 0 +} + +## locate some directory in XDG data dirs +getXDGdir(){ + DIR="$1" + local IFS=":" + for i in ${XDG_DATA_DIRS:-/usr/share} + do + if [[ -d "$i/$DIR" ]] + then + echo "$i/$DIR" + return 0 + fi + done + return 0 +} + +## get the window icon using the XDG dir find function above (for eventual compatibility with a DEST_DIR type install +getIcon(){ + ICON_DIR="$(getXDGdir icons)" + ICONPATH="$ICON_DIR/hicolor/48x48/apps/obi-window-icon.png" + export ICONPATH + echo "${ICONPATH}" + return 0 +} + +[[ -z "$ICONPATH" ]] && ICONPATH="$(getIcon)" && export ICONPATH +ZEN_ICON="--window-icon=$ICONPATH" +LENGTH=0 +curlang="$LANG" +[[ -z "$prgnam" ]] && prgnam="$OneButtonInstaller" && export prgnam + +## log info and function name +## ARGS +# 1 - function name +# 2.... - the message +echoLOG(){ + unset functionName + functionName="$1" + shift + MSG="$*" + [[ -z "${MSG}" ]] && return + if [[ "$USEZENITY" == "true" ]] + then + echo -e "
[$functionName]
${MSG}" >> "${HOME}/obi-installer.html" + fi + echo -e "[$functionName] ${MSG}" >> "${HOME}/obi-installer.log" + return 0 +} + +## start our LOG +startLOG(){ + echo "Start at: $(date)" > "${HOME}/obi-installer.log" + return 0 +} + +## display info in a dialog +## ARGS +# 1 - function name +# 2.... - the message +## this also calls echoLOG to log the information +echoOut() { + unset functionName + functionName="$1" + shift + if [[ "$USEZENITY" == "true" ]] + then + zenity --class=OBI --info --timeout=7 --title="$OneButtonInstaller" "$ZEN_ICON" --text="$*" 2>/dev/null + else + dialog --infobox "$*" 0 0 + sleep .7 + fi + echoLOG "$functionName" "$*" + return 0 +} +## Compatibility for this script +## TODO: remove this stuff eventually +LOGecho(){ + echoLOG "obi-functions" "$*" +} +echoout() { + echoOut "obi-functions" "$*" +} + +## get OBI version +getVersion(){ + APTCACHE=$(which apt-cache 2>/dev/null) + if [[ -n "${APTCACHE}" ]] + then +## give the apt version + OBIver="$(apt-cache policy one-button-installer 2>/dev/null)" + [[ -n "$OBIver" ]] && LOGecho "$OBIver" + ver_no=$(apt-cache policy one-button-installer | grep Installed: | sed 's/Installed://' | sed 's/ubuntu.*//') + version="$prgnam $ver_no" + fi + ## just give the program name + if [[ -z "${version}" ]] + then + version="$prgnam" + fi + export version + echo "$version" + return 0 +} +[[ -z "${version}" ]] && version="$(getVersion)" && export version + +## figure out where the OBI functions are +getDpath(){ + unset dpath + if [[ -f "/home/$USER/obi" ]] + then + dpath="/home/$USER" + elif [[ -f "$PWD/obi" ]] + then + dpath="$PWD" + elif [[ -f "${HOME}/obi" ]] + then + dpath="${HOME}" + elif [[ -f "/usr/share/OBI/obi" ]] + then + dpath="/usr/share/OBI" + else + echoout "$ScriptnotfoundChangedirectory" + exit 1 + fi + export dpath + echo "$dpath" + return 0 +} +[[ -z "$dpath" ]] && dpath="$(getDpath)" && export dpath +[[ -z "$obi_system" ]] && obi_system=$(getOBISystem) && export obi_system +WARN_COLOR="#cc0000" +BG_COLOUR="white" + +## Make the HELP text +mkhelp(){ + unset MSG + hlptxt="$HOME/help-mkusb.txt" + + if [[ ! -f "$hlptxt" ]] + then +# echo "Collecting data for 'Help to select drive'" + br="
" + preopen="
"
+		preclose="
$br" + spanopen="$br$br" + spanclose="$br$br$preopen" + + echo ""> "$hlptxt" + [[ "$USEZENITY" == "true" ]] && echo "" >> "$hlptxt" + echo "Collected data to help select target drive" >> "$hlptxt" + [[ "$USEZENITY" == "true" ]] && echo "$br" >> "$hlptxt" + echo "_______________________________________________" >> "$hlptxt" + echo " " >> "$hlptxt" + #echo "lshw -class disk #####" >> "$hlptxt" + #lshw -class disk >> "$hlptxt" + [[ "$USEZENITY" == "true" ]] && echo "$spanopen" >> "$hlptxt" + echo "list_drives ##### script built into $prgnam" >> "$hlptxt" + [[ "$USEZENITY" == "true" ]] && echo "$spanclose" >> "$hlptxt" + listeddrives=$("$dpath"/list_drives) + [[ "$USEZENITY" == "true" ]] && listeddrives="${listeddrives//\\n/
}" + echo -e "$listeddrives">> "$hlptxt" + [[ "$USEZENITY" == "true" ]] && echo "$preclose" >> "$hlptxt" + echo "_______________________________________________" >> "$hlptxt" + [[ "$USEZENITY" == "true" ]] && echo "$spanopen" >> "$hlptxt" + echo "ls -l /dev/disk/by-id| grep [a-z]$|tr -s ' ' ' ' \\" >> "$hlptxt" + echo "|cut -d ' ' -f 9,11|sort -k2|grep -e \^a -e \^u \\" >> "$hlptxt" + echo "|sed 's#../..#/dev#' ##### also empty mass storage devices" >> "$hlptxt" + [[ "$USEZENITY" == "true" ]] && echo "$spanclose" >> "$hlptxt" + ls -l /dev/disk/by-id| grep "[a-z]$"|tr -s ' ' ' ' \ + |cut -d ' ' -f 9,11|sort -k2|grep -e \^a -e \^u \ + |sed 's#../..#/dev#' >> "$hlptxt" + [[ "$USEZENITY" == "true" ]] && echo "$preclose" >> "$hlptxt" + echo "_______________________________________________" >> "$hlptxt" + [[ "$USEZENITY" == "true" ]] && echo "$spanopen" >> "$hlptxt" + echo "lsusb|sort -k 4,4 -k 1 #####" >> "$hlptxt" + [[ "$USEZENITY" == "true" ]] && echo "$spanclose" >> "$hlptxt" + lsusb|sort -k 4,4 -k 1 >> "$hlptxt" + [[ "$USEZENITY" == "true" ]] && echo "$preclose" >> "$hlptxt" + echo "_______________________________________________" >> "$hlptxt" + [[ "$USEZENITY" == "true" ]] && echo "$spanopen" >> "$hlptxt" + echo "fdisk -lu 2>/dev/null|grep \"/dev/[^f]d\"|sort #####" >> "$hlptxt" + [[ "$USEZENITY" == "true" ]] && echo "$spanclose" >> "$hlptxt" + fdisk -lu 2>/dev/null|grep "/dev/[^f]d"|sort >> "$hlptxt" + [[ "$USEZENITY" == "true" ]] && echo "$preclose" >> "$hlptxt" + echo "_______________________________________________" >> "$hlptxt" + [[ "$USEZENITY" == "true" ]] && echo "$spanopen" >> "$hlptxt" + echo "parted -ls #####" >> "$hlptxt" + [[ "$USEZENITY" == "true" ]] && echo "$spanclose" >> "$hlptxt" + parted -ls >> "$hlptxt" + [[ "$USEZENITY" == "true" ]] && echo "$preclose" >> "$hlptxt" + echo "_______________________________________________" >> "$hlptxt" + [[ "$USEZENITY" == "true" ]] && echo "$spanopen" >> "$hlptxt" + echo "blkid|sort #####" >> "$hlptxt" + [[ "$USEZENITY" == "true" ]] && echo "$spanclose" >> "$hlptxt" + blkid|sort >> "$hlptxt" + [[ "$USEZENITY" == "true" ]] && echo "$preclose" >> "$hlptxt" + echo "_______________________________________________" >> "$hlptxt" + [[ "$USEZENITY" == "true" ]] && echo "$spanopen" >> "$hlptxt" + echo "lsblk -f #####" >> "$hlptxt" + [[ "$USEZENITY" == "true" ]] && echo "$spanclose" >> "$hlptxt" + lsblk -f >> "$hlptxt" + [[ "$USEZENITY" == "true" ]] && echo "$preclose" >> "$hlptxt" + + if [ -n "$(df|grep '/dev/[^f]d'|sort )" ] + then + [[ "$USEZENITY" == "true" ]] && echo "$spanopen" >> "$hlptxt" + echo "df|grep \"/dev/[^f]d\"|sort #####" >> "$hlptxt" + [[ "$USEZENITY" == "true" ]] && echo "$spanclose" >> "$hlptxt" + df|grep "/dev/[^f]d"|sort >> "$hlptxt" + [[ "$USEZENITY" == "true" ]] && echo "$preclose" >> "$hlptxt" + echo "_______________________________________________" >> "$hlptxt" + fi + #echo "--------------------------------------------------------------------" +# echo "This help text is read with less $hlptxt" + #### xterm -geometry 120x40 -title "less $hlptxt" -e less "$hlptxt" & + fi + + btitlh="$version - $Helpinfotoselectdrive" + xtitle="$keystoscrollthishelpinfo" + if [[ "$USEZENITY" == "true" ]] + then + MSG="$( < $hlptxt)" + MSG="${MSG//\\n/
}" + MSG=" + +${MSG} + +" + BIG=600 + SMALL=510 + WIDTH=$BIG + if bigOrSmall + then + WIDTH=$SMALL + fi + echo "$MSG" >"$hlptxt" + zenity --class=OBI --text-info "${ZEN_ICON}" --title="$btitlh" --html --width="$WIDTH" --height=500 --filename="$hlptxt" 2>/dev/null + else + dialog --backtitle "$btitlh" --title "$xtitle"\ + --exit-label "$OK" \ + --no-shadow --textbox "$hlptxt" 0 0 + fi + return 0 +} + +####################################################################### +####################################################################### + +check_packages(){ + +# check pipe view and offer installation + + if ! "$checked_pack" + then + if [[ -n "$(which pv)" ]] + then + pvplug=true + else + if [[ "$USEZENITY" == "true" ]] + then + zenity --class=OBI --question "${ZEN_ICON}" --title="$OneButtonInstaller" --text="$TheprogramPV\n$Doyouwanttoinstallit" 2>/dev/null + retval="$?" + pvi="n" + + if (( retval == 0 )) + then + pvi="y" + fi + else + echoout "$TheprogramPV" + read -p "$Doyouwanttoinstallit (y/N)" pvi + fi + + if [[ "$pvi" == "y" ]] + then + echo "apt-get install pv" + apt-get install --yes pv + fi + if [[ -n "$(which pv)" ]] + then + pvplug=true ## what is this for?? + else + pvplug=false ## what is this for?? + fi + fi +# echo $pvplug + +# check menu packages and offer installation + + menu_package_installer needs dialog "mkusb version 7.4 works without it" + menu_package_installer wants zenity "mkusb can work without it." +# menu_package_installer wants smartctl "mkusb can work without it." smartmontools + + zenity --class=OBI --info --text="test" --timeout=1 2> /dev/null + if [[ "$?" -eq 5 ]] + then + zenityplug=true + else + zenityplug=false + fi + + checked_pack=true + fi + return 0 +} + +####################################################################### +####################################################################### + +menu_package_installer() { + +# $1 "needs" or "wants" +# $2 program name +# $3 informative test string +# $4 package name (if different from program name) + +# Example (shows full syntax but smartctl is *not* used by mkusb) +# menu_package_installer wants smartctl "mkusb can work without it." smartmontools + + + if [[ -z "$4" ]] + then + package="$2" + else + package="$4" + fi + which "$2" > /dev/null + if (( $? != 0 )) + then + if [[ "$USEZENITY" == "true" ]] + then + zenity --class=OBI --question --title="$OneButtonInstaller" "${ZEN_ICON}" --text="mkusb $1 the program '$2' for the menus.\n$Doyouwanttoinstallit" 2>/dev/null + retval="$?" + pvi="n" + (( retval == 0 )) && pvi="y" + else + echoout "mkusb $1 the program '$2' for the menus." + read -p "$Doyouwanttoinstallit (y/N)" pvi + fi + if [[ "$pvi" == "y" ]] + then + echoout "$Preparesystemuptodate\napt-get update && apt-get upgrade" + sleep 2 + apt-get update && apt-get upgrade + echoout "Install program $2 ... in package $package\napt-get install --yes --no-install-recommends $package" + sleep 2 + apt-get install --yes --no-install-recommends "$package" + fi + which "$2" > /dev/null + if (( $? != 0 )) + then + echoout "$version $1 $2 $butitisnotinstalled.\n$3" + if [[ "$1" == "needs" ]] + then + exit 1 + else + read -t 3 + fi + fi + fi + return 0 +} + +####################################################################### +####################################################################### + +# --colors +# Interpret embedded "\Z" sequences in the dialog text by the following +# character, which tells dialog to set colors or video attributes: +# 0 through 7 are the ANSI used in curses: +# 0 1 2 3 4 5 6 7 +# black, red, green, yellow, blue, magenta, cyan and white respectively. +# +# Bold is set by 'b', reset by 'B'. +# Reverse is set by 'r', reset by 'R'. +# Underline is #set by 'u', reset by 'U'. +# The settings are cumulative, e.g., "\Zb\Z1" makes the following text +# bold (perhaps #bright) red. Restore normal settings with "\Zn". + +######################################################################## +######################################################################## + +init_dialog(){ +# create the file for run-time configuration, with text names for colours + dialog --create-rc "$HOME/.dialogrc" +# initiate colours + sed -i 's/use_colors.*/use_colors = ON/' "$HOME/.dialogrc" + sed -i 's/screen_color =.*/screen_color = (CYAN,BLUE,ON)/' "$HOME/.dialogrc" + return 0 +} + +######################################################################## +######################################################################## +warning_dialog(){ +# set red warning screen background + sed -i 's/screen_color =.*/screen_color = (yellow,red,ON)/' "$HOME/.dialogrc" + return 0 +} + +######################################################################## +######################################################################## +normal_dialog(){ +# set blue normal screen background + sed -i 's/screen_color =.*/screen_color = (CYAN,BLUE,ON)/' "$HOME/.dialogrc" + return 0 +} + +######################################################################## +## Find the selected tarball +######################################################################## +selector_of_tarball_dir(){ + retval=0 + unset selected + if [[ -f /usr/share/OBI/selected ]] + then + selected="/usr/share/OBI/selected" + elif [[ -f "${HOME}"/selected ]] + then + selected="${HOME}/selected" + elif [[ -f "${PWD}/selected" ]] + then + selected="${PWD}/selected" + else + selected="" + LOGecho "$ErrorfindingtheOBIselectedpath" + retval=1 + fi + echo "$selected" + return "$retval" +} +getTarballFile(){ + TARBALLfile=$(selector_of_tarball_dir) + retval="$?" + [[ -f "$TARBALLfile" ]] && TARBALLfile="$( < $TARBALLfile)" + echo "$TARBALLfile" + return "$retval" +} +####################################################################### +## Find the device the tarball is on, used to not unmount it +####################################################################### +findTARBALLdev(){ + unset LOOKFOR + LOOKFOR="$1" + ANSWER="" + local IFS=" +" + things=($(mount)) + for _device in "${things[@]}" + do + thisone=$(echo "${_device}" | cut -f3 -d' ') + theOne=$(echo "${_device}" | cut -f1 -d' ') + [[ "${LOOKFOR/$thisone}" != "${LOOKFOR}" ]] && ANSWER="$theOne" + done + [[ -n "$ANSWER" ]] && echo "$ANSWER" + return 0 +} + +## convert Dialog formatting to HTML +## this process is used often, so I made a function to do it, and keep it standardized +convertDialogtoHTML(){ + MSG="$*" + MSG="${MSG//\\Zn/}" + MSG="${MSG//\\Z5/}" + MSG="${MSG//\\Zb/}" + MSG="${MSG//\\Z4/}" + MSG="${MSG//\\Z7/}" + MSG="${MSG//\\Z1/}" + MSG="${MSG//\\n/
}" + echo -e "${MSG}" + return 0 +} +list_device_dialog(){ + [[ -z "$dpath" ]] && dpath="$(getDpath)" +## + p1="$1" +## Name in the dialog + dialog_name="$2" + [[ -z "$dialog_name" ]] && dialog_name="$SelectDevice - $andContinue" + LENGTH="${#dialog_name}" + use_warn="${3^^}" ## TRUE + use_GRUB="${4^^}" ## TRUE + DisplayText="$5" + DisplayText="$DisplayText\n$Pleaseselectadevicewiththearrowkeys" + +# check if all drives should be available at start (not only USB) +# usbonly default true, can be changed with parameter2 'all' + if [[ "$p1" == "all" ]] || [[ "$p1" == "anh" ]] + then + usbonly=false + else + usbonly=true + fi +# make command and run command, 'here we go' + ans=-1 + choice=1 + unset target + LC_ALL=C + LANG=C + unset tmpstr + +##TODO: remake using bashisms only + ltest0=$(grep -m 1 " / " /etc/mtab|cut -d ' ' -f 1) + + if [[ "$ltest0" == "/cow" ]] || [[ "$ltest0" == "aufs" ]] || [[ "$ltest0" == "rootfs" ]] || [[ "$ltest0" == "overlay" ]] + then + ltest1=$(grep ' /isodevice' /etc/mtab|cut -c 5-8) + if [[ -n "$ltest1" ]] + then + livedrive="$ltest1" + else + ltest1=$(grep ' /cdrom' /etc/mtab|cut -c 5-8) + if [[ -n "$ltest1" ]] + then + livedrive="$ltest1" + else + ltest1=$(grep ' iso9660' /etc/mtab|grep -v ' /media'|grep -v ' /mnt'|cut -c 5-8) + livedrive="not_found" + if [[ -n "$ltest1" ]] + then + livedrive="$ltest1" + fi + fi + fi + elif [ "${ltest0/\/dev\/[^f]d}" != "$ltest0" ] + then + livedrive=$(grep " / " /etc/mtab|cut -c 5-8) + else + livedrive="not_found" + fi + + tmpstr=$("$dpath"/list_drives) + [[ -z "$tmpstr" ]] && LOGecho "[WARNING] NO DRIVES FOUD.. this in an error" + LOGecho "ltest0=$ltest0\nltest1=$ltest1\nlivedrive=$livedrive\ntmpstr=$tmpstr\nusbonly=$usbonly" +#echo $tmpstr +#read -p "press enter to continue" + tmpstr="$tmpstr\n\n$Bootedfrom: /dev$livedrive" + + while [[ "$ans" == "$answer_u" ]] || (( ans < 0 )) + do + ufl=d ## what is this for?? + if $usbonly + then + ufl=usb ## what is this for?? + fi + + if [[ "$use_warn" == "TRUE" ]] + then + MSG=" \Z1$WARNING $Unmountthetargetdeviceifmounted\Zn\n\n$tmpstr\n$usbstr" + if [[ "$USEZENITY" == "true" ]] + then +## convert dialog style warning to html style + MSG="${MSG//\\Z1/}" + + MSG=" + +${MSG} + +" + +## convert dialog style warning to html style + MSG="$(convertDialogtoHTML ${MSG})" + +## DISPLAY HTML MESSAGE +## check to see if we need BIG or small windows + BIG=690 + SMALL=510 + WIDTH=$BIG + if bigOrSmall + then + WIDTH=$SMALL + fi + echo "$MSG" | zenity --class=OBI --text-info --width="$WIDTH" --height=375 "${ZEN_ICON}" --title="$version - $SelectDevice - $warningandoverview" --html --filename="/dev/stdin" 2>/dev/null + else + ## capture dialog garbage to prevent it from being returned + var=$(dialog --backtitle "$version - $SelectDevice - $warningandoverview" \ + --colors --no-collapse --cr-wrap --no-shadow --msgbox "$MSG" 0 0 3>&1 1>&2 2>&3 3>&- ) + fi + fi ## use the warning dialog + aind=0 + bind=0 + unset adev + unset atxt + unset bvar + if [[ -z "$LENGTH" ]] + then + LENGTH=0 + fi + +#-----------------------------------------------------------------------------# +#DON'T UNMOUNT DEVICE WITH TARBALL!!!!!! +#-----------------------------------------------------------------------------# + TARBALLfile="$(getTarballFile)" + DONTumountDRIVE=$(findTARBALLdev "$TARBALLfile") + if [[ -z "$DONTumountDRIVE" ]] + then + LOGecho "[WARNING] selected tarball device is not mounted?!?!?" + else + LOGecho "DON'T unmount: $DONTumountDRIVE for $TARBALLfile" + fi + + for DEVICE in $("$dpath"/list_drives "$usbonly"|tr -s ' ' ' '|cut -d ' ' -f 4) + do + busy=0 + if [[ "$use_GRUB" != "TRUE" ]] + then + for unmountDEV in $(grep "$DEVICE" /etc/mtab|sed s#\ /.*##) + do + if [[ "${DONTumountDRIVE/$unmountDEV}" == "${DONTumountDRIVE}" ]] + then +## this isn't the same lets unmount it + umount "$unmountDEV" 2>/dev/null + retval="$?" + fi + if [[ "$retval" == "1" ]] + then + busy=1 + fi + done + fi + tj=$("$dpath"/list_drives "$usbonly"|grep "$DEVICE") + +# echo "${tj:0:7}" +# echo "${tj}" +# read -p "select-device at Warning and Error" + if [[ "${tj:1:7}" == "Warning" ]] || [[ "${tj:1:5}" == "Error" ]] + then + tj=$(fdisk -lu "$DEVICE" 2>/dev/null|grep "$DEVICE":|sed s/\,\ .*//) + fi + if [[ "$DEVICE" == "/dev$livedrive" ]] + then + [[ "$use_GRUB" != "TRUE" ]] && adev[$aind]="$ans_q" + [[ "$USEZENITY" != "true" ]] && atxt[$aind]="\Z5\Zb${tj/Name:/Live:}\Zn" + [[ "$USEZENITY" == "true" ]] && atxt[$aind]="${tj/Name:/Live:}" + aind=$((aind + 1)) + elif [[ "$busy" == "1" ]] + then + [[ "$use_GRUB" != "TRUE" ]] && adev[$aind]="$ans_q" + [[ "$USEZENITY" != "true" ]] && atxt[$aind]="\Z4\Zb${tj/Name:/Busy:}\Zn" + [[ "$USEZENITY" == "true" ]] && atxt[$aind]="${tj/Name:/Busy:}" + aind=$((aind + 1)) + else +## these len,lenny,lentil variables are all +## LENGTH variables for different text I just made fun names + len="${#DEVICE}" + len=$(( len )) + lenny="${#tj}" + lenny=$(( lenny )) + lentil=$(( len + lenny )) + if (( lentil > LENGTH )) + then + export LENGTH=$(( lentil )) + fi + adev[$aind]="$DEVICE" + atxt[$aind]="$tj" + aind=$((aind + 1)) + fi + done + + adev[$aind]="$answer_u" + if $usbonly + then + atxt[$aind]="$toggleUSBonly; $showalldrives" + else + atxt[$aind]="$toggleUSBonly; $hideotherdrives" + fi + + [[ "$use_GRUB" != "TRUE" ]] && aind=$((aind + 1)) + [[ "$use_GRUB" != "TRUE" ]] && adev[$aind]="$ans_q" + [[ "$use_GRUB" != "TRUE" ]] && atxt[$aind]="$quitinstalling" + + aind=$((aind + 1)) + for (( xi=0; xi < aind ; xi++ )) + do + if [[ "${adev[$xi]}" == "$answer_u" ]] + then + bvar[$bind]="$answer_u" + elif [[ "${adev[$xi]}" == "$ans_q" ]] + then + [[ "$use_GRUB" != "TRUE" ]] && bvar[$bind]="$ans_q" + else + bvar[$bind]=$((xi+1)) + fi + bind=$(($bind + 1)) + bvar[$bind]="${atxt[$xi]}" + bind=$(($bind + 1)) + done + + if [[ "$USEZENITY" == "true" ]] + then + W=$LENGTH + WIDTH=$(( W )) + bigg=12 + smll=10 + multi=$bigg + if bigOrSmall + then + multi=$smll + fi + WIDTH=$(( WIDTH * multi )) + LOGecho "Window sizing\n Text length:${LENGTH}\nGuessed Width=$WIDTH (if this is too small it will default to 500)" + if (( WIDTH < 500 )) + then + WIDTH=500 + fi + ans=$(zenity --class=OBI --list "${ZEN_ICON}" --title="$version - $dialog_name" --text="$DisplayText" --width="$WIDTH" --height=220 --column "$Hotkey" --column="$Availabledevices" "${bvar[@]}" 2>/dev/null) + retval=$? + ans="${ans:0:1}" + else + ans=$(dialog \ + --backtitle "$version - $dialog_name" \ + --title "$Pleaseselectadevicewiththearrowkeys" \ + --colors --no-shadow --ok-label "$Go" --cancel-label "$Quit" --no-shadow \ + --menu "$Availabledevices" \ + 17 100 $aind "${bvar[@]}" 3>&1 1>&2 2>&3 3>&- ) + retval=$? + fi + + [[ "$use_GRUB" == "TRUE" ]] && (( retval != 0 )) && echoout "$NEEDbootDEV" + [[ -n "$ans" ]] && LOGecho "list_device_dialog():$ans" + + if (( retval != 0 )) + then + ans="$ans_q" + fi + + if [[ "$ans" == "$answer_u" ]] + then + choice=1 + if $usbonly + then + usbonly=false + else + usbonly=true + fi + elif [[ "$ans" == "$ans_q" ]] || [[ -z "$ans" ]] || (( ans < 0 )) + then + if [[ "$use_GRUB" != "TRUE" ]] + then + clearOBI + return 1 + else + LOGecho "NO quitting now!! :D" + fi + else + choice=$((ans - 1)) + target="${adev[$choice]}" + cmdsav="${atxt[$choice]}" + fi + export target + echo "${target}" + export cmdsav + done + + return 0 +} +####################################################################### +####################################################################### + +## just make the SVG arrow used in 'final warning' phase +ArrowSVG(){ + arrow=' + + + + + + + + + +' + echo -e "$arrow" + return 0 +} + +select_device(){ + ## PICK A DEVICE using our other function + target=$(list_device_dialog "$1" "$2" "TRUE") + retval="$?" + ## echo out our choice + echo "${target}" + ## leave if the user canceled selecting something + if (( retval == 1 )) + then + return 1 + fi + +# here we go + if [[ "$source" == "/dev/zero" ]] + then + doing="$wiping\n\n" + else + doing="$installingtheoperatingsystem \Z4$obi_system\Zn\n " + [[ "$USEZENITY" == "true" ]] && doing="$installingtheoperatingsystem $obi_system" + fi + +#echo "$obi_system" "$imagefile" "$target" +#echo "$cmdsav" + cmdsav="${cmdsav/USB\:\ }" + cmdsav="${cmdsav/Name\:\ usb\-}" + cmdsav="${cmdsav/Name\:\ ata\-}" + cmdsav="${cmdsav/Dev\:}" + cmdsav="${cmdsav/Size\:}" + cmdsav=$(tr -s ' ' ' ' <<< "$cmdsav") + cmdsav=$(sed 's/ / /g' <<< "$cmdsav") + + LANG="$curlang" + width="600" + if bigOrSmall + then + width=480 + fi + if [[ "$USEZENITY" == "true" ]] + then + +# get SVG from the above function + arrow="$(ArrowSVG)" + + MSG=" + +

+
+$prgnam
+$thetargetwillbe ${doing}
+$TARGET $cmdsav
+
+ $FINALWARNING $beforewipingandinstalling +
+

+ +$arrow +" + +## remove Dialog formatting and replace with HTML style + MSG="$(convertDialogtoHTML ${MSG})" + + ans=$(echo "${MSG}" | zenity --class=OBI --text-info "${ZEN_ICON}" --html --title="$version - $SelectDevice - $FINALWARNING" --width="$width" --height=330 --checkbox="$Checkthisboxifyouarereadytogo" --filename="/dev/stdin" 2>/dev/null) + retval1="$?" + else + +## USE DIALOG NOT ZENITY + warning_dialog ## make warning colors using esacpe sequences for the terminal + + ans=$(dialog --cr-wrap --no-collapse --defaultno --colors --no-shadow \ +--backtitle "$version - $SelectDevice - $FINALWARNING" \ +--yesno "$prgnam $thetargetwillbe ${doing}\n$TARGET\Z4$cmdsav\Zn\n\n +\Z1\Z7 $FINALWARNING \Z1 $beforewipingandinstalling\Zn" 13 "$width" \ + 3>&1 1>&2 2>&3 3>&- ) + retval1="$?" + normal_dialog ## return to normal colors using esacpe sequences for the terminal + + fi + + ## if device selection was a 'no' then reset everything + if (( retval1 != 0 )) + then + clearOBI + return 1 + fi + + swapoff "$target"* 2>/dev/null + sync + + return 0 +} + +####################################################################### +####################################################################### + +general_file_select() { +## TODO: pass imagefile in as $1 + if [[ -f "$imagefile" ]] + then + choice="$imagefile" + else + choice="$PWD/" + fi + + if $zenityplug || [[ "$USEZENITY" == "true" ]] + then + ans=$(zenity --class=OBI --file-selection --title "${ZEN_ICON}" "$version - $Selectsourcefile" \ +--filename="$choice" --file-filter=*.tar.?z 2>/dev/null) + else + ans=$(dialog --backtitle \ +"$SPACEBARSLASH" \ +--no-shadow --fselect "$choice" 7 200 3>&1 1>&2 2>&3 3>&- ) + fi + + imagefile="$ans" +# write selection or blank + LOGecho "imagefile=$imagefile in 'general_file_select'" +## echo it out? + return 0 +} + +####################################################################### +####################################################################### + +select_source() { + LANG="$curlang" + menutitle="$Findisoandimagefiles" + + if $zenityplug || [[ "$USEZENITY" == "true" ]] + then + level="$normalfiletypefilter" + menutitle="$menutitle\n\n +\Z1$Increasethesizeoftheterminalwindow\Zn" + + else + level="difficult" + menutitle="$menutitle\n +\Z1$Avoidspacesandspecialcharacters\Zn" + fi + +#while [ "$ans" != "q" ] && [ "$ans" != "" ] +#do + if [[ "$USEZENITY" == "true" ]] + then + menutitle="${menutitle/\\Z1/}" + menutitle="${menutitle/\\Zn/}" + ans=$(zenity --class=OBI --list "${ZEN_ICON}" --title="$version - $Selectsourcefile" --text="$selectactionwithletterorarrow" --column="$Hotkey" --column="$menutitle" \ +"$ans_s" "$nosearchforlinkedfiles" \ +"$ans_l" "$includeLinkedfiles" \ +"$ans_g" "$GeneralFileselector ($level)" \ +"$ans_q" " $Quit" 2>/dev/null ) + ans="${ans:0:1}" + + else + + ans=$(dialog --no-shadow --backtitle "$version - $Selectsourcefile" \ +--colors --cancel-label "$Quit" \ +--title "$selectactionwithletterorarrow" \ +--menu "$menutitle" 18 80 4 \ +"$ans_s" "$nosearchforlinkedfiles" \ +"$ans_l" "$includeLinkedfiles" \ +"$ans_g" "$GeneralFileselector ($level)" \ +"$ans_q" " $Quit" \ + 3>&1 1>&2 2>&3 3>&- ) + + fi + + case $ans in + "$ans_s")special_file_select;; + "$ans_l")special_file_select "-L";; + "$ans_g")general_file_select;; + "$ans_q")return;; + *)general_file_select;; ## default to this I guess + esac +#done + + if [[ ! -f "$imagefile" ]] + then + unset imagefile + fi + +# write selection + [[ ! -f "$selected" ]] && selected=$(selector_of_tarball_dir) + echo "$imagefile" > "$selected" + + LOGecho "select_source: imagefile=$imagefile" + + unset ans + return 0 +} + +####################################################################### +####################################################################### + +ch_display() { + menutitle="$Amongfilesselecteddirectory\n" + + if [[ "$USEZENITY" == "true" ]] + then + ans=$(zenity --class=OBI --list "${ZEN_ICON}" --title="$version - $Selectfiletypetodisplay" --text="$selectactionwithletterorarrow" --column="$Hotkey" --column="$menutitle" \ +"$ans_a" "$allfilessuitable" \ +"$ans_iso" "$onlyISOfiles" \ +"$ans_m" "$onlyimagefiles" \ +"$ans_q" " $Quit" 2>/dev/null ) + ans="${ans:0:1}" + + else + ans=$(dialog --no-shadow --backtitle "$version - $Selectfiletypetodisplay" \ +--colors --cancel-label "$Quit" --default-item "$1" \ +--title "$selectactionwithletterorarrow" \ +--menu "$menutitle" 18 80 4 \ +"$ans_a" "$allfilessuitable" \ +"$ans_iso" "$onlyISOfiles" \ +"$ans_m" "$onlyimagefiles" \ +"$ans_q" " $Quit" \ + 3>&1 1>&2 2>&3 3>&- ) + fi + + if [[ "$ans" == "$ans_a" ]] || [[ "$ans" == "$ans_iso" ]] || [[ "$ans" == "$ans_m" ]] + then + ch_item="$ans" + fi + return 0 +} + +## A function to log the result of a command, if the return value is not 0 log with '[WARNING FAILURE]' +## ARGS +# 1 - return value to check (and return) +# 2 - function name (for logging) +# 3.... - the message to display +TestTrue(){ + unset MSG functionName retval + retval=0 + retval="$1" + [[ -z "$retval" ]] && return 1 + shift + functionName="$1" + [[ -z "$functionName" ]] && return 1 + shift + MSG="$*" + [[ -z "$MSG" ]] && MSG="No Message" && retval=1 + if (( retval == 0 )) + then + echoLOG "$functionName" "${MSG}" + else + if [[ "$USEZENITY" == "true" ]] + then + echoLOG "$functionName" "[WARNING FAILURE]${MSG}" + else + echoLOG "$functionName" "[WARNING FAILURE] ${MSG}" + fi + fi + return "$retval" +} + +## Start the chroot, and mount all relevant things +## ARGS +# 1 - the chroot directory +# 2 - the function name calling this (for logging) +startCHROOT(){ + unset thisCHROOTDIR functionName + thisCHROOTDIR="$1" + [[ -z "$thisCHROOTDIR" ]] && return 1 + [[ ! -d "$thisCHROOTDIR" ]] && return 1 + functionName="$2" + [[ -z "$functionName" ]] && functionName="obi-installer" + retval=0 + mount -t proc proc "$thisCHROOTDIR"/proc + retval="$?" + TestTrue "$retval" "$functionName" "mount -t proc proc $thisCHROOTDIR/proc" + mount -t sysfs sys "$thisCHROOTDIR"/sys + retval1="$?" + TestTrue "$retval1" "$functionName" "mount -t sysfs sys $thisCHROOTDIR/sys" + if (( retval1 != 0 )) + then + retval="$retval1" + fi + mount -o bind /dev "$thisCHROOTDIR"/dev + retval1="$?" + TestTrue "$retval1" "$functionName" "mount -o bind /dev $thisCHROOTDIR/dev" + if (( retval1 != 0 )) + then + retval="$retval1" + fi + mount -o bind /dev/pts "$thisCHROOTDIR"/dev/pts + retval1="$?" + TestTrue "$retval1" "$functionName" "mount -o bind /dev/pts" + if (( retval1 != 0 )) + then + retval="$retval1" + fi +## use some system files to get internet + cp -f /etc/hosts "${thisCHROOTDIR}"/etc/hosts + retval1="$?" + TestTrue "$retval1" "$functionName" "cp /etc/hosts" + cp -f /etc/resolv.conf "${thisCHROOTDIR}"/etc/resolv.conf + retval2="$?" + TestTrue "$retval1" "$functionName" "cp /etc/resolv.conf" + if (( retval2 != 0 )) + then + retval1="$retval2" + fi + if (( retval1 != 0 )) + then + echoLOG "$functionName" "Did not copy files correctly for the internet to work, however they may have been copied earlier" + fi + return "$retval" +} + +## End the chroot begun earlier with startCHROOT +## ARGS +# 1 - the chroot directory +# 2 - the function name calling this (for logging) +endCHROOT(){ + unset thisCHROOTDIR functionName + thisCHROOTDIR="$1" + functionName="$2" + [[ -z "$functionName" ]] && functionName="obi-installer" + # Unmount the things we mounted in 'startCHROOT' + umount -lf "${thisCHROOTDIR}"/dev/pts + retvalpts="$?" + TestTrue "$retvalpts" "$functionName" "umount -lf ${thisCHROOTDIR}/dev/pts" + umount -lf -t proc "${thisCHROOTDIR}"/proc + retvalproc="$?" + TestTrue "$retvalproc" "$functionName" "umount -lf -t proc ${thisCHROOTDIR}/proc" + umount -lf -t sysfs "${thisCHROOTDIR}"/sys + retvalsysfs="$?" + TestTrue "$retvalsysfs" "$functionName" "umount -lf -t sysfs ${thisCHROOTDIR}/sys" + ## at the return values together if they are all 0 then it worked + retval=$(( retvalpts + retvalproc + retvalsysfs )) + if (( retval == 0 )) + then + ## they ARE zero... lets try unmounting /dev recursizely + umount -lRf "${thisCHROOTDIR}"/dev + retval="$?" + TestTrue "$retval" "$functionName" "umount -lRf ${thisCHROOTDIR}/dev" + (( $retval == 0 )) && return 0 + fi + ## if that didn't work... we need to try again + umount -lRf "$thisCHROOTDIR"/{proc,sys,dev} + retval="$?" + TestTrue "$retval" "$functionName" "umount -lRf $thisCHROOTDIR/{proc,sys,dev}" + if (( retval != 0 )) + then + #make the internal field separator a newline for the mount command output + local IFS=" +" + ## do some hardcore chroot unmounting + chrootCommand "${thisCHROOT}" "umount -afl" + (( $? == 0 )) && return 0 + chrootCommand "${thisCHROOT}" "umount -ARf" + (( $? == 0 )) && return 0 + ## hopefully we don't get this far... but we need to still check... + ## get a list of things mounted if they are still mounted + TOTALMOUNT=($(mount |grep "${thisCHROOTDIR}")) + for stillMOUNT in "${TOTALMOUNT[@]}" + do + stillMOUNT="/${stillMOUNT#*\/}" + stillMOUNT="${stillMOUNT%% *}" + #If there is a device left in our string.... + if [[ -n "$stillMOUNT" ]] + then + #force unmount the device + umount --force "$stillMOUNT" +##TODO add fuser/lsof portion here + retval="$?" + TestTrue "$retval" "$functionName" "Trying to unmount $stillMOUNT" + fi + done + fi + # Unmount dev from the chroot, this is our last ditch effort + umount -lf "${thisCHROOTDIR}"/dev + lastretval="$?" + TestTrue "$lastretval" "$functionName" "umount -lf ${thisCHROOTDIR}/dev" + return $lastretval +} + +## Exit the program and reset everything +## ARGS +# 1 - the function calling this +# 2 - the return value +# 3... - the message to show/log +ErrorExit(){ + unset MSG functionName + retval=0 + functionName="$1" + shift + retval="$2" + shift + MSG="$*" + echoOut "${functionName}" "${MSG}" + [[ -z "$USEZENITY" ]] && USEZENITY="$(getZenity)" + if [[ "$USEZENITY" != "true" ]] + then + read -p "$PressEntertocontinue" + fi + clearOBI + exit "$retval" +} + +## run a command in a chroot +## ARGS +# 1 - the chroot directory +# 2 - the function that is calling this (for logging) +# 3... - the commands +chrootCommand(){ + unset thaCHROOT functionName thisCOMMAND + retval=0 + thaCHROOT="$1" + shift + functionName="$1" + [[ -z "$thaCHROOT" ]] && echoLOG "${functionName:-function name is empty}" "chroot is empty cannot run: $*" && return 1 + [[ -z "$functionName" ]] && return 1 + shift + thisCOMMAND="$*" + [[ -z "${thisCOMMAND}" ]] && return 1 + chroot "$thaCHROOT" bash -c "${thisCOMMAND}" + retval="$?" + TestTrue "$retval" "$functionName" "chroot command: ${thisCOMMAND}" + return "$retval" +} + +## the directory where tarballs exist +findTarballDirectory(){ + retval=0 + unset tarpath + if [[ -d "/tarballs" ]] + then + tarpath="/tarballs" + elif [[ -d "${HOME}/tarballs" ]] + then + tarpath="${HOME}/tarballs" + elif [[ -d "${PWD}/tarballs" ]] + then + tarpath="${PWD}/tarballs" + else + retval=1 + tarpath="${HOME}" + echoLOG "obi-functions" "$Errorfindingthetarballpathsoitwasmadeat\n$tarpath" + fi + echo "${tarpath}" + return "$retval" +} + +## Echo the location of the partitions file +getPartitions(){ + [[ -z "$dpath" ]] && dpath="$(getDpath)" + echo "$dpath/partitions" + return 0 +} + +## force the chroot to unmount +## ARGS +# 1 - the chroot dir +# 2 - the function name +forceUmount(){ + [[ -z "${CHROOT}" ]] && CHROOT="/mnt" + thisCHROOT="${CHROOT}" + [[ -n "$1" ]] && thisCHROOT="$1" + functionName="$2" + [[ -z "$functionName" ]] && functionName="obi-functions" + retval=0 + mountLIST=("$thisCHROOT/dev/pts" "$thisCHROOT/dev" "$thisCHROOT/proc" "$thisCHROOT/sys" "$thisCHROOT") + for item in "${mountLIST[@]}" + do + MOUNTIE=$(mount |grep "${item}") + if [[ -n "${MOUNTIE}" ]] + then + LOG_ECHO "found: ${MOUNTIE}" + umount --force "${item}" + retval1="$?" + if (( retval1 != 0 )) + then + retval="$retval1" + echoLOG "$functionName" "ran: umount --force ${item}" + fi + fi + done + return "$retval" +} + +## a simple function to return the release name, i.e. 'stretch' or 'bionic' +## ARGS +# 1 - the chroot directory +# 2 - the function name +getChrootRelease(){ + thisCHROOT="$1" + funName="$2" + RELEASE=$(chrootCommand "$thisCHROOT" "$funName" 'lsb_release -a 2>&1| grep Codename:| awk -F\; "{print $1 }" | sed "s/Codename://" | tr -d "\t"') + echo "$RELEASE" +} +## a simple default chroot directory (to make sure it is always the same) +# 1 - the chroot directory +chrootDirectory(){ + thisCHROOT="$1" + [[ ! -d "${thisCHROOT}" ]] && thisCHROOT="/mnt" + echo "$thisCHROOT" + return 0 +} diff -Nru obi-installer-3.3.0ubuntu0/OBI/obi-readme obi-installer-3.4.0ubuntu0/OBI/obi-readme --- obi-installer-3.3.0ubuntu0/OBI/obi-readme 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/obi-readme 2018-03-15 13:13:10.000000000 +0000 @@ -1,6 +1,10 @@ #!/bin/bash -. gettext.sh +eval_gettext(){ + echo -e "$*" +} +source gettext.sh export TEXTDOMAIN=obi-installer +########################################################### HELP=$(eval_gettext "Help") EXIT=$(eval_gettext "Quit") QUICKStartGuide=$(eval_gettext "Quick Start Guide") @@ -9,38 +13,36 @@ LEARNmoreABOUTobi=$(eval_gettext "Learn more about the One Button Installer") ########################################################### EXEC_LINE="" + if which xmessage >/dev/null 2>&1 then - EXEC_LINE="xmessage" + EXEC_LINE="xmessage" fi + if which gxmessage >/dev/null 2>&1 then - EXEC_LINE="gxmessage" + EXEC_LINE="gxmessage" fi + PDF=$(which evince) -if [ -z "${PDF}" ] + +if [[ -z "${PDF}" ]] then - PDF=$(which xpdf) - if [ -z "${PDF}" ] - then - $EXEC_LINE -title "OBI $HELP" -nearmouse "You must install xpdf of evince for this to work" - exit 42 - fi + PDF=$(which xpdf) + if [[ -z "${PDF}" ]] + then + $EXEC_LINE -title "OBI $HELP" -nearmouse "You must install xpdf of evince for this to work" + exit 42 + fi fi #BGCOLOR=$(xmllint --xpath 'string(//TrayStyle/Background)' "${HOME}"/.jwmrc) #FGCOLOR=$(xmllint --xpath 'string(//TrayStyle/Foreground)' "${HOME}"/.jwmrc) #COLOURS="-bg $BGCOLOR -fg $FGCOLOR" # maybe don't use colors? $EXEC_LINE -title "OBI $HELP" -nearmouse -buttons "$QUICKStartGuide:1,$DETAILEDhelp:2,$ABOUTobi:3,$EXIT:4" "$LEARNmoreABOUTobi" RESULT=$? -if [ "$RESULT" == 1 ] -then - "${PDF}" /usr/share/docs/OBI/OBI-quick-start-manual.pdf -elif [ "$RESULT" == 2 ] -then - "${PDF}" /usr/share/docs/OBI/README.pdf -elif [ "$RESULT" == 3 ] -then - "${PDF}" /usr/share/docs/OBI/DescriptionoftheOneButtonInstaller.pdf -else - exit -fi +case $RESULT in + 1)"${PDF}" /usr/share/docs/OBI/OBI-quick-start-manual.pdf;; + 2)"${PDF}" /usr/share/docs/OBI/README.pdf;; + 3)"${PDF}" /usr/share/docs/OBI/DescriptionoftheOneButtonInstaller.pdf;; + *)exit;; +esac diff -Nru obi-installer-3.3.0ubuntu0/OBI/partition-help obi-installer-3.4.0ubuntu0/OBI/partition-help --- obi-installer-3.3.0ubuntu0/OBI/partition-help 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/partition-help 2018-03-15 13:13:10.000000000 +0000 @@ -1,5 +1,8 @@ #!/bin/bash -. gettext.sh +eval_gettext(){ + echo -e "$*" +} +source gettext.sh export TEXTDOMAIN=obi-installer # DO NOT TRANSLATE redtext="\0033[31m" @@ -9,6 +12,7 @@ resetvid="\0033[0m" ########################################################### ## \n is a new line character please leave alone +OK=$(eval_gettext "OK") errorMUSTexit=$(eval_gettext "Error finding the OBI path.\nEXITING IMMEDIATELY") MAINTEXT=$(eval_gettext "You can install a system from a tarball into two partitions:\n\n one root file system partition and one swap partition. This way it is possible to create a *dual boot* device with an existing (already installed) operating system. It is also possible to create a separate\n*data partition*, that can be used by linux as well as Windows. (Must be FAT32, FAT16, or NTFS) OSX uses HFS and HFS+, though FAT32 will work well with both OSX and Linux. NTFS is usable by OSX through 3rd party apps.\n\n") OBIdetects=$(eval_gettext "OBI detects") @@ -34,63 +38,61 @@ PutthelabelobiswaptoonepartitionandformatittoFAT32=$(eval_gettext "2. Put the label obi-swap to one partition and format it to FAT32") ItisfasttoformattoFAT32anditwillbeoverwrittenbytheOBI=$(eval_gettext "(It is fast to format to FAT32, and it will be overwritten by the OBI)") canbeanythingelse=$(eval_gettext "*. The other partitions 'can be anything else'") -OneButtonInstaller=$(eval_gettext "One Button Installer") +Mustquittographicalenvironmenttoproceed=$(eval_gettext "Must quit to graphical environment, to proceed") ########################################################### -[[ -f "$HOME/usezenity" ]] && USEZENITY=$(cat "$HOME/usezenity") -echoout() { - if [[ "$USEZENITY" == "true" ]] - then - zenity --class=OBI --info --timeout=7 --title="$OneButtonInstaller" "$ZEN_ICON" --text="$*" - echo -e "
[partition-help]
$*" >> "${HOME}"/obi-installer.log - else - dialog --infobox "$*" 0 0 - sleep .7 - echo -e "[partition-help] $*" >> "${HOME}"/obi-installer.log - fi +################################################ +## Source our handy functions!! +## make sure they are in the PATH first +OBI_SHARE_DIR="/usr/share/OBI" +if [[ -d "${OBI_SHARE_DIR}" ]] && [[ "${PATH/$OBI_SHARE_DIR}" == "${PATH}" ]] +then + PATH="${PATH}:/usr/share/OBI" + export PATH +elif [[ "${PATH/$PWD}" == "${PATH}" ]] +then + PATH="${PATH}:${PWD}" + export PATH +fi +source obi-functions || exit +################################################ +ECHO() { + echoOut "partition-help" "$*" } -LOGecho(){ - if [[ "$USEZENITY" == "true" ]] - then - echo -e "
[partition-help]
$*" >> "${HOME}"/obi-installer.log - else - echo -e "[partition-help] $*" >> "${HOME}"/obi-installer.log - fi +LOG_ECHO(){ + echoLOG "partition-help" "$*" } -ICONPATH="/usr/share/icons/hicolor/48x48/apps/obi-window-icon.png" + +## global variables +[[ -z "$USEZENITY" ]] && USEZENITY="$(getZenity)" +ICONPATH="$(getIcon)" ZEN_ICON="--window-icon=$ICONPATH" -if [[ -f /usr/share/OBI/partition-help ]] -then - dpath="/usr/share/OBI" -elif [[ -f "$HOME/partition-help" ]] -then - dpath="$HOME" -elif [[ -f "$PWD/partition-help" ]] + +dpath="$(getDpath)" +if [[ -z "$dpath" ]] then - dpath="$PWD" -else - echoout "$errorMUSTexit" - exit 42 + ECHO "$errorMUSTexit" + exit 42 fi memerhlp(){ - ram=$("$dpath/memer") - ram=$(($ram)) - swapsize=$(( (ram+512*1024)/1024 )) - swapsize=$((swapsize * 105/100)) - ram_mb=$((ram/1024)) - LOGecho "RAM size:$ram_mb MibiBytes" - LOGecho "SWAP size:$swapsize MibiBytes" - echo -e "$LAPTOPSWAP\nRAM = ${redtext}$ram_mb MibiBytes${resetvid}\nSwap = ${redtext}$swapsize MibiBytes ${resetvid}" + ram=$("$dpath/memer") + ram=$(($ram)) + swapsize=$(( (ram+512*1024)/1024 )) + swapsize=$((swapsize * 105/100)) + ram_mb=$((ram/1024)) + LOG_ECHO "RAM size:$ram_mb MibiBytes" + LOG_ECHO "SWAP size:$swapsize MibiBytes" + echo -e "$LAPTOPSWAP\nRAM = ${redtext}$ram_mb MibiBytes${resetvid}\nSwap = ${redtext}$swapsize MibiBytes ${resetvid}" } #memerhlp MSG="--- $UseGpartedandpreparethedevicefortheOBI ---\n$PutthelabelobiroottoonepartitionandformatittoFAT32\n$PutthelabelobiswaptoonepartitionandformatittoFAT32\n$ItisfasttoformattoFAT32anditwillbeoverwrittenbytheOBI\n$canbeanythingelse\n__________________________________________________________________________" -if [ "$USEZENITY" == "true" ] +if [[ "$USEZENITY" == "true" ]] then - zenity --class=OBI --info "${ZEN_ICON}" --timeout=3 --text="$MSG" + zenity --class=OBI --info "${ZEN_ICON}" --timeout=3 --text="$MSG" 2> /dev/null else - dialog --infobox "$MSG" 0 0 - sleep .7 + dialog --infobox "$MSG" 0 0 + sleep .7 fi filename="$HOME/partition-help.txt" @@ -102,63 +104,72 @@ intro="$num_devices $DEVices" if [[ "$num_devices" == "1" ]] then - device="/dev/${devices[0]}" - intro="$num_devices $DEVice" + device="/dev/${devices[0]}" + intro="$num_devices $DEVice" fi + MEMERMESS=$(memerhlp) drive_size=$(lsblk |grep "^${devices[0]}" | awk '{print $4}') text="\n$applywithgreencheck\n$MAINTEXT\n$OBIdetects $intro\n${redtext}${device}${resetvid}\n\n$sizeCHART\n ${redtext}${devices[0]} \t $drive_size${resetvid}\n\n$MEMERMESS\n\n\n$NOTE_RAM" SWAPEXIST=$(lsblk -ro NAME,FSTYPE,LABEL,SIZE,MOUNTPOINT|grep -i swap|sed 's/ .*//') + if [[ -n "$SWAPEXIST" ]] then - [[ "$USEZENITY" == "true" ]] && SWAPEXIST="
$SWAPEXIST
" - text="$text\n\n\n$SwapExistsHere ${redtext}$SWAPEXIST${resetvid}" + [[ "$USEZENITY" == "true" ]] && SWAPEXIST="
$SWAPEXIST
" + text="$text\n\n\n$SwapExistsHere ${redtext}$SWAPEXIST${resetvid}" fi if [[ "$USEZENITY" == "true" ]] then - text="

$editNcreate

${text}" - formatted=${text} - formatted=${formatted//"$greentext"/} - formatted=${formatted//"$resetvid"/<\/b><\/span>} - formatted=${formatted//"$redtext"/} - formatted=${formatted//\\n/
} - formatted=${formatted//\\t/ } - formatted=" + text="

$editNcreate

${text}" + formatted=${text} + formatted=${formatted//"$greentext"/} + formatted=${formatted//"$resetvid"/<\/b><\/span>} + formatted=${formatted//"$redtext"/} + formatted=${formatted//\\n/
} + formatted=${formatted//\\t/ } + formatted=" ${formatted} " - (echo "${formatted}" )| zenity --class=OBI --text-info "${ZEN_ICON}" --title="$HELPTITLE" --width=470 --height=550 --html --filename="/dev/stdin" & + (echo "${formatted}" )| zenity --class=OBI --text-info "${ZEN_ICON}" --title="$HELPTITLE" --width=470 --height=550 --html --filename="/dev/stdin" 2> /dev/null & else -text="$editNcreate\n${text}" - echo -e "${text}" > "${filename}" - if which xterm >/dev/null 2>&1 - then - xterm -sb -rightbar -fa default -fg black -bg beige -fs 12 -geometry 80x32 -title "$HELPTITLE" -hold -e fold -sw 80 "${filename}" & - fi + text="$editNcreate\n${text}" + echo -e "${text}" > "${filename}" + dialog --backtitle "$btitlh" --title "$xtitle"\ + --exit-label "$OK" \ + --no-shadow --textbox "$text" fi sleep 3 -sudo gparted + +if [[ "$TERM" == "linux" ]] && [[ -z "$DISPLAY" ]] +then + ECHO "$Mustquittographicalenvironmenttoproceed" + clearOBI + sudo startx 2>/dev/null +else + sudo gparted +fi rootpart=$(blkid -c /dev/null|grep -i obi|grep -im1 root|cut -d: -f1) swappart=$(blkid -c /dev/null|grep -i obi|grep -im1 swap|cut -d: -f1) while [[ -z "$rootpart" ]] do - if [[ "$USEZENITY" == "true" ]] - then - zenity --class=OBI --question "${ZEN_ICON}" --text="$noRootPart" - else - dialog --backtitle "$noRootPart" --yesno "$noRootPart" 0 0 - fi - case $? in - 0) - sudo gparted - rootpart=$(blkid -c /dev/null|grep -i obi|grep -im1 root|cut -d: -f1) - ;; - *)exit;; - esac + if [[ "$USEZENITY" == "true" ]] + then + zenity --class=OBI --question "${ZEN_ICON}" --text="$noRootPart" 2> /dev/null + else + dialog --backtitle "$noRootPart" --yesno "$noRootPart" 0 0 + fi + case $? in + 0) + sudo gparted + rootpart=$(blkid -c /dev/null|grep -i obi|grep -im1 root|cut -d: -f1) + ;; + *)exit;; + esac done -LOGecho "root: $rootpart" -[[ -n "$swappart" ]] && LOGecho "swap: $swappart" +LOG_ECHO "root: $rootpart" +[[ -n "$swappart" ]] && LOG_ECHO "swap: $swappart" diff -Nru obi-installer-3.3.0ubuntu0/OBI/position_win obi-installer-3.4.0ubuntu0/OBI/position_win --- obi-installer-3.3.0ubuntu0/OBI/position_win 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/position_win 2018-03-15 13:13:10.000000000 +0000 @@ -1,56 +1,69 @@ #!/bin/bash -USEZENITY="FALSE" -[[ -f "$HOME/usezenity" ]] && USEZENITY=$(cat "$HOME/usezenity") -LOGecho(){ - if [ "$USEZENITY" == "true" ] - then - echo -e "
[position_win]
$*" >> "${HOME}"/obi-installer.log - else - echo -e "[position_win] $*" >> "${HOME}"/obi-installer.log - fi + +################################################ +## Source our handy functions!! +## make sure they are in the PATH first +OBI_SHARE_DIR="/usr/share/OBI" +if [[ -d "${OBI_SHARE_DIR}" ]] && [[ "${PATH/$OBI_SHARE_DIR}" == "${PATH}" ]] +then + PATH="${PATH}:/usr/share/OBI" + export PATH +elif [[ "${PATH/$PWD}" == "${PATH}" ]] +then + PATH="${PATH}:${PWD}" + export PATH +fi +source obi-functions || exit +################################################ +LOG_ECHO(){ + echoLOG "position_win" "$*" } pid="$1" if [[ -z "$pid" ]] then - LOGecho "pid is zero length.. check for a different window name" - exit + LOG_ECHO "pid is zero length.. check for a different window name" + exit fi win_width="$2" win_height="$3" [[ -n "$4" ]] && multi="$4" [[ -z "$multi" ]] && multi=1 -wxh=$(xrandr|grep '*'|sed -e 's/^ *//' -e 's/ .*//') -swide=${wxh/x*} -shigh=${wxh/*x} -zleft=$(( ($swide - $win_width)/2 )) -if [ $zleft -lt 0 ] + +## if wmctrl isn't installed we don't really need to do anything +if [[ -n "$(which wmctrl 2>/dev/null)" ]] then - zleft=0 -fi + wxh=$(xrandr 2>/dev/null|grep '*'|sed -e 's/^ *//' -e 's/ .*//' ) + swide=${wxh/x*} + shigh=${wxh/*x} + zleft=$(( ($swide - $win_width)/2 )) + if (( $zleft < 0 )) + then + zleft=0 + fi + #### My buffer zone for bottom panels # We NEED to take in the window's title bar into account -titlebarheight=20 + titlebarheight=20 # generic panel height -panelheight=32 + panelheight=32 #This should give us a good guess -buffer=$(( $titlebarheight + $panelheight)) + buffer=$(( $titlebarheight + $panelheight)) #ztop=$(( 3*($shigh - $win_height)/4 )) -ztop=$(( $shigh - ($multi * ($win_height+$buffer)) )) -if [ $ztop -lt 0 ] -then - ztop=0 -fi -if [ -n "$(which wmctrl)" ] -then - # window id - wid= - while [ "$wid" == "" ] - do - wid=$(wmctrl -lp | grep "$pid" | cut "-d " -f1) - done - LOGecho "Found $wid for the window to position" + ztop=$(( $shigh - ($multi * ($win_height+$buffer)) )) + if (( $ztop < 0 )) + then + ztop=0 + fi + +# window id + unset wid + while [[ -z "$wid" ]] + do + wid=$(wmctrl -lp | grep "$pid" | cut "-d " -f1 2>/dev/null) + done + LOG_ECHO "Found $wid for the window to position" # -e gravity,x,y,w,h - wmctrl -i -r "$wid" -e 0,"$zleft","$ztop","$win_width","$win_height" - wmctrl -a "$wid" + wmctrl -i -r "$wid" -e 0,"$zleft","$ztop","$win_width","$win_height" + wmctrl -a "$wid" fi diff -Nru obi-installer-3.3.0ubuntu0/OBI/restore_xz-lzma obi-installer-3.4.0ubuntu0/OBI/restore_xz-lzma --- obi-installer-3.3.0ubuntu0/OBI/restore_xz-lzma 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/restore_xz-lzma 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -#!/bin/bash - -sleep 3 -xterm -fullscreen -fa default -fs 13 -e sudo apt-get install --yes xz-lzma - diff -Nru obi-installer-3.3.0ubuntu0/OBI/select-device obi-installer-3.4.0ubuntu0/OBI/select-device --- obi-installer-3.3.0ubuntu0/OBI/select-device 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/select-device 2018-03-15 13:13:10.000000000 +0000 @@ -1,5 +1,8 @@ #!/bin/bash -. gettext.sh +eval_gettext(){ + echo -e "$*" +} +source gettext.sh export TEXTDOMAIN=obi-installer ########################################################### Usage=$(eval_gettext "Usage") @@ -8,7 +11,6 @@ TARGET=$(eval_gettext "Target:") ## \n is a newline character please leave to separate lines Installtoamassstoragedevicedrive=$(eval_gettext "Install to a mass storage device, typically an\ninternal hard disk drive or external USB or eSATA drive") -OneButtonInstaller=$(eval_gettext "One Button Installer") Selectdevice=$(eval_gettext "Select device") Doyouwanttoinstall=$(eval_gettext "Do you want to install:") ## Enter is the Return (Enter) key on the keyboard @@ -16,106 +18,141 @@ Checktheresult=$(eval_gettext "Check the result") options_options_options=$(eval_gettext "Choose the drive to install to:") ########################################################### -# functions and variables -[[ -f "$HOME/usezenity" ]] && USEZENITY=$(cat "$HOME/usezenity") -LOGecho(){ - if [[ "$USEZENITY" == "true" ]] - then - echo -e "
[select-device]
$*" >> "${HOME}"/obi-installer.log - else - echo -e "[select-device] $*" >> "${HOME}"/obi-installer.log - fi -} -tailfile="${HOME}"/.obi-progress -[[ -z "$obi_system" ]] && obi_system=$(cat "$HOME/OSname") - -source functions -if (( $? != 0 )) +################################################ +## Source our handy functions!! +## make sure they are in the PATH first +OBI_SHARE_DIR="/usr/share/OBI" +if [[ -d "${OBI_SHARE_DIR}" ]] && [[ "${PATH/$OBI_SHARE_DIR}" == "${PATH}" ]] +then + PATH="${PATH}:/usr/share/OBI" + export PATH +elif [[ "${PATH/$PWD}" == "${PATH}" ]] then - clearOBI - exit + PATH="${PATH}:${PWD}" + export PATH fi +source obi-functions || exit +source mkp || exit +################################################ + +## wrapper for obi-functions +ECHO() { + echoOut "select-device" "$*" +} +LOG_ECHO(){ + echoLOG "select-device" "$*" +} +tailfile="${HOME}"/.obi-progress +[[ -z "$obi_system" ]] && obi_system="$(getOBISystem)" +[[ -z "$tarball" ]] && tarball="$(getTarballFile)" mkctrl "$obi_system" "$tarball" echo "25 #OBI progress">> "$tailfile" # variables -choice=1 -bs=4096 -count=256 -cnt= -target= -source="$1" +#choice=1 #do I need this? +unset target +CHROOT="$1" +CHROOT=$(chrootDirectory "${CHROOT}") LC_ALL=C LANG=C -tmpstr="" +unset tmpstr if [[ -z "${version}" ]] then - version="$(getVersion)" + version="$(getVersion)" fi # usage if [[ "$(whoami)" != "root" ]] then - MSG="$Usage\n$Installtoamassstoragedevicedrive\n---- $Install $obi_system --------\nsudo $0" - if [[ "$USEZENITY" == "true" ]] - then - zenity --warning --text="$MSG" - else - echo -e "$MSG" - fi - clearOBI - exit -else + MSG="$Usage\n$Installtoamassstoragedevicedrive\n---- $Install $obi_system --------\nsudo $0" + if [[ "$USEZENITY" == "true" ]] + then + zenity --warning --text="$MSG" 2>/dev/null + else + echo -e "$MSG" + fi + clearOBI + exit +fi + +# INITIAL CONFIRMATION DIALOG (DO YOU WANT TO INSTALL?) +if [[ "$USEZENITY" == "true" ]] +then + BIG=415 + SMALL=300 + WIDTH=$BIG + if bigOrSmall + then + WIDTH=$SMALL + fi - # INITIAL CONFIRMATION DIALOG (DO YOU WANT TO INSTALL?) - if [[ "$USEZENITY" == "true" ]] - then - zenity --class=OBI --question --width=415 --title="$version - $Selectdevice" --text="$Doyouwanttoinstall\n$obi_system" - retval="$?" - else - ans=$(dialog --backtitle "$version - $Selectdevice" \ + zenity --class=OBI --question --width="$WIDTH" --title="$version - $Selectdevice" --text="$Doyouwanttoinstall\n$obi_system" 2>/dev/null + retval="$?" +else + dialog --backtitle "$version - $Selectdevice" \ --yesno "$Doyouwanttoinstall\n$obi_system" 0 0 \ -3>&1 1>&2 2>&3 3>&- ) - retval="$?" - fi - - if (( retval == 0 )) - then - echo "30 #OBI progress">> "$tailfile" +3>&1 1>&2 2>&3 3>&- + retval="$?" +fi +useMakeLUB(){ + useSWAPPER="TRUE" + [[ "$tarball" == "${tarball/noswap}" ]] && [[ -n "${tarball}" ]] && useSWAPPER="FALSE" + Target="$3" + makelub "$1" "$2" "$Target" "TRUE" "$useSWAPPER" "${Target}1" "${Target}2" #obi-home .... + retval="$?" + MSG="makelub" + case $retval in + 0) MSG="$MSG worked";; + 1) MSG="$MSG chroot variable was empty, or some other failure";; + 2) MSG="$MSG tarball variable was empty, or some other failure";; + 3) MSG="$MSG device variable was empty, or some other failure";; + 4) MSG="$MSG FORMAT (true/false) variable was empty, or some other failure";; + 5) MSG="$MSG SWAP (true/false) variable was empty, or some other failure";; + *) MSG="$MSG failed in an unknown way returning: $retval";; + esac + TestTrue "$retval" "select-device" "$MSG" + return "$retval" +} +if (( retval == 0 )) +then + echo "30 #OBI progress">> "$tailfile" - ## DEVICE SELECTION DIALOG - # sourced from functions - select_device all "$options_options_options" - - if (( $? == 0 )) - then - cnt="count=$count" - # wipe the first mibibyte and install - LOGecho "[select-device] dd if=/dev/zero bs=$bs $cnt of=$target" - dd if=/dev/zero bs="$bs" "$cnt" of="$target" - - echo "35 #OBI progress">> "$tailfile" - LOGecho "\n$Installing $obi_system\n$TARGET $target ...\n\nmklub $obi_system $tarball $target" - read -sn1 -t3 - - # the installer sourced from mkp* whatever - mklub "$obi_system" "$tarball" "$target" - if [[ "$USEZENITY" == "true" ]] - then - LOGecho "$Checktheresult" - else - read -p "$ChecktheresultandpressEntertocontinue" - fi - else - clearOBI - exit - fi - else - clearOBI - exit - fi +## DEVICE SELECTION DIALOG +# select_device is sourced from obi-functions + target=$(select_device all "$options_options_options") + retval="$?" + if (( retval == 0 )) + then + LOGecho "Found device: $target" + bs=4096 + count=256 + #cnt="count=$count" +# wipe the first mibibyte and install + LOGecho "Running: dd if=/dev/zero bs=$bs count=$count of=$target" + dd if=/dev/zero bs="$bs" count="$count" of="$target" + + echo "35 #OBI progress">> "$tailfile" + LOGecho "\n$Installing $obi_system\n$TARGET $target ...\n\nmklub $obi_system $tarball $target" + read -sn1 -t3 + [[ -z "$tarball" ]] && tarball="$(getTarballFile)" +# use the mkp installer OR the installer sourced from mkp* whatever + useMakeLUB "$CHROOT" "$tarball" "$target" || mklub "$CHROOT" "$obi_system" "$tarball" "$target" + + if [[ "$USEZENITY" == "true" ]] + then + LOGecho "$Checktheresult" + else + read -p "$ChecktheresultandpressEntertocontinue" + fi + else + clearOBI + exit "$retval" + fi +else + clearOBI + exit "$retval" fi diff -Nru obi-installer-3.3.0ubuntu0/OBI/selected obi-installer-3.4.0ubuntu0/OBI/selected --- obi-installer-3.3.0ubuntu0/OBI/selected 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/selected 2018-03-15 13:13:10.000000000 +0000 @@ -1 +1 @@ -/tarballs/ToriOS-i386-jessie.tar.xz +ToriOS-i386-stretch.tar.xz diff -Nru obi-installer-3.3.0ubuntu0/OBI/select-part1 obi-installer-3.4.0ubuntu0/OBI/select-part1 --- obi-installer-3.3.0ubuntu0/OBI/select-part1 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/select-part1 2018-03-15 13:13:10.000000000 +0000 @@ -10,7 +10,10 @@ # 2013-08-09 sudodus removed lame logic for wipe as alternative to install # #----------------------------------------------------------------------------- -. gettext.sh +eval_gettext(){ + echo -e "$*" +} +source gettext.sh export TEXTDOMAIN=obi-installer ###################################################### Usage=$(eval_gettext "Usage:") @@ -22,62 +25,71 @@ Selectpartition=$(eval_gettext "Select partition") Install=$(eval_gettext "Install:") installTARGET=$(eval_gettext "Install to a mass storage device, typically an\ninternal hard disk drive or external USB or eSATA drive") -noextraparameters=$(eval_gettext "No extra parameters") +#noextraparameters=$(eval_gettext "No extra parameters") OneButtonInstaller=$(eval_gettext "One Button Installer") ########################################################### -[[ -f "$HOME/usezenity" ]] && USEZENITY=$(cat "$HOME/usezenity") -ICONPATH="/usr/share/icons/hicolor/48x48/apps/obi-window-icon.png" -ZEN_ICON="--window-icon=$ICONPATH" -echoout() { - if [[ "$USEZENITY" == "true" ]] - then - echo -e "
[select-part1]
$*" >> "${HOME}"/obi-installer.log - zenity --class=OBI --info --timeout=7 --title="$OneButtonInstaller" "$ZEN_ICON" --text="$*" - else - echo -e "[select-part1] $*" >> "${HOME}"/obi-installer.log - dialog --infobox "$*" 0 0 - sleep .7 - fi + +################################################ +## Source our handy functions!! +## make sure they are in the PATH first +OBI_SHARE_DIR="/usr/share/OBI" +if [[ -d "${OBI_SHARE_DIR}" ]] && [[ "${PATH/$OBI_SHARE_DIR}" == "${PATH}" ]] +then + PATH="${PATH}:/usr/share/OBI" + export PATH +elif [[ "${PATH/$PWD}" == "${PATH}" ]] +then + PATH="${PATH}:${PWD}" + export PATH +fi +source obi-functions || exit +################################################ +ECHO() { + echoOut "select-part1" "$*" } -LOGecho(){ - if [[ "$USEZENITY" == "true" ]] - then - echo -e "
[select-part1]
$*" >> "${HOME}"/obi-installer.log - else - echo -e "[select-part1] $*" >> "${HOME}"/obi-installer.log - fi +LOG_ECHO(){ + echoLOG "select-part1" "$*" } +[[ -z "$USEZENITY" ]] && USEZENITY="$(getZenity)" +ICONPATH="$(getIcon)" +ZEN_ICON="--window-icon=$ICONPATH" +obi_system="$(getOBISystem)" +version="$(getVersion)" + LC_ALL=C LANG=C tmpstr= -[[ -z "$obi_system" ]] && obi_system=$(cat "$HOME/OSname") -version=$( grep -i 'obi version' change.log|tail -n1|tr -s ' ' ' '| \ - cut -d ' ' -f 5-6) +##TODO system if [[ "$(whoami)" != "root" ]] then - echoout "$Usage\n$Install $obi_system\n$installTARGET\n---- $Install $system --------\nsudo $0" - exit + ECHO "$Usage\n$Install $obi_system\n$installTARGET\n---- $Install $obi_system --------\nsudo $0" + exit fi - ltest0=$(grep " / " /etc/mtab|cut -d ' ' -f 1) - if [ "$ltest0" == "/cow" ] - then - ltest1=$(grep " /isodevice" /etc/mtab|cut -c 5-8) - livedrive=$ltest1 - elif [[ "${ltest0/\/dev\/[^f]d}" != "$ltest0" ]] - then - livedrive=$(grep " / " /etc/mtab|cut -c 5-8) - else - livedrive="not_found" - fi - tmpstr=$(for i in /dev/[^f]d?; do sudo parted -ls|grep -B1 "$i"|tr '\n' '\t' \ +ltest0=$(grep " / " /etc/mtab|cut -d ' ' -f 1) +if [[ "$ltest0" == "/cow" ]] +then + ltest1=$(grep " /isodevice" /etc/mtab|cut -c 5-8) + livedrive=$ltest1 +elif [[ "${ltest0/\/dev\/[^f]d}" != "$ltest0" ]] +then + livedrive=$(grep " / " /etc/mtab|cut -c 5-8) +else + livedrive="not_found" +fi + +tmpstr=$(for i in /dev/[^f]d?; do sudo parted -ls|grep -B1 "$i"|tr '\n' '\t' \ |sed -e 's/.*Error:/No (wiped?) or bad partition table: Disk/' \ |sed -e 's/ unrecognised.*//' ;echo "";done) - tmpstr="$tmpstr\nBooted from: /dev$livedrive\n" - tmpstr=$tmpstr$(for i in $(find /sys/devices -name "*sd?"|grep usb|sed s#.*/##) + +tmpstr="$tmpstr\nBooted from: /dev$livedrive\n" + +tmpstr=$tmpstr$(for i in $(find /sys/devices -name "*sd?"|grep usb|sed s#.*/##) do fdisk -lu "/dev/$i" 2>/dev/null|grep "Disk /dev" done |sed 's/Disk/USB device: /'|sort) + + MSG=" \Z1$WARNING $thepartitionswillbecompletelyoverwritten\Zn\n $GetmorehelptoselectdeviceatStarter\n --- \Z1$Unmountthetargetpartitions\Zn --------------------\n @@ -86,18 +98,18 @@ if [[ "$USEZENITY" == "true" ]] then - MSG="${MSG//\\Z1/}" + MSG="${MSG//\\n/
}" + MSG=" ${MSG} " - echo "$MSG" | zenity --class=OBI --text-info --width=570 --height=270 "$ZEN_ICON" --title="$TITLEtext" --html --filename="/dev/stdin" + echo "$MSG" | zenity --class=OBI --text-info --width=570 --height=270 "$ZEN_ICON" --title="$TITLEtext" --html --filename="/dev/stdin" 2> /dev/null else - dialog --backtitle "$TITLEtext" \ + dialog --backtitle "$TITLEtext" \ --colors --no-collapse --cr-wrap --msgbox \ 17 76 "$MSG" fi diff -Nru obi-installer-3.3.0ubuntu0/OBI/select-part2 obi-installer-3.4.0ubuntu0/OBI/select-part2 --- obi-installer-3.3.0ubuntu0/OBI/select-part2 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/select-part2 2018-03-15 13:13:10.000000000 +0000 @@ -4,7 +4,11 @@ # # date editor comment # 2015-04-16 sudodus Modified for mktbl -. gettext.sh + +eval_gettext(){ + echo -e "$*" +} +source gettext.sh export TEXTDOMAIN=obi-installer ################################ thisdeviceismounted=$(eval_gettext "This device mounted and cannot be unmounted:") @@ -16,14 +20,13 @@ Usage=$(eval_gettext "Usage:") selectpartitionAdvanced=$(eval_gettext "Select partition for the advanced Installer level") pgrmname=$(eval_gettext "One Button Installer") -SelectOBIlevel=$(eval_gettext "Select OBI level") EXamples=$(eval_gettext "Examples:") scrollifnecessary=$(eval_gettext "scroll if necessary ") Youmustselectrootpartition=$(eval_gettext "You must select a root partition") OneButtonInstaller=$(eval_gettext "One Button Installer") NAME=$(eval_gettext "NAME") SIZE=$(eval_gettext "SIZE") -TYPE=$(eval_gettext "TYPE") +#TYPE=$(eval_gettext "TYPE") FSTYPE=$(eval_gettext "FSTYPE") LABEL=$(eval_gettext "LABEL") MOUNTPOINT=$(eval_gettext "MOUNTPOINT") @@ -32,220 +35,204 @@ ##please do not put spaces in this!!! No_swap=$(eval_gettext "No_swap") ########################################################### -[[ -f "$HOME/usezenity" ]] && USEZENITY=$(cat "$HOME/usezenity") -ICONPATH="/usr/share/icons/hicolor/48x48/apps/obi-window-icon.png" -WINDOW_ICON="/usr/share/icons/hicolor/64x64/apps/zmktbl.png" -ZEN_ICON="--window-icon=$ICONPATH" - -targ="$1" - -echoout() { - if [[ "$USEZENITY" == "true" ]] - then - echo -e "
[select-part2]
$*" >> "${HOME}"/obi-installer.log - zenity --class=OBI --info --timeout=7 --title="$OneButtonInstaller" "$ZEN_ICON" --text="$*" - else - echo -e "[select-part2] $*" >> "${HOME}"/obi-installer.log - dialog --infobox "$*" 0 0 - sleep .7 - fi +##TODO: add other obi- partitions (i.e. obi-home) +################################################ +## Source our handy functions!! +## make sure they are in the PATH first +OBI_SHARE_DIR="/usr/share/OBI" +if [[ -d "${OBI_SHARE_DIR}" ]] && [[ "${PATH/$OBI_SHARE_DIR}" == "${PATH}" ]] +then + PATH="${PATH}:/usr/share/OBI" + export PATH +elif [[ "${PATH/$PWD}" == "${PATH}" ]] +then + PATH="${PATH}:${PWD}" + export PATH +fi +source obi-functions || exit +################################################ +ECHO() { + echoOut "select-part2" "$*" } -LOGecho(){ - if [[ "$USEZENITY" == "true" ]] - then - echo -e "
[select-part2]
$*" >> "${HOME}"/obi-installer.log - else - echo -e "[select-part2] $*" >> "${HOME}"/obi-installer.log - fi +LOG_ECHO(){ + echoLOG "select-part2" "$*" } +[[ -z "$USEZENITY" ]] && USEZENITY="$(getZenity)" +ICONPATH="$(getIcon)" +ZEN_ICON="--window-icon=$ICONPATH" +version="$(getVersion)" +[[ -z "$dpath" ]] && dpath="$(getDpath)" -# usage +targ="$1" + +## usage if [[ "$(whoami)" != "root" ]] || ! ( [ "$1" == "root" ] || [ "$1" == "swap" ] ) then - echoout "$selectpartitionAdvanced\n-------------------------------------------\n$Usage sudo $0 [dobi|zobi|dmktbl|zmktbl]\n$EXamples\nsudo $0 root\nsudo $0 root zobi\nsudo $0 root zmktbl\nsudo $0 swap" - exit + ECHO "$selectpartitionAdvanced\n-------------------------------------------\n$Usage sudo $0 [dobi|zobi|dmktbl|zmktbl]\n$EXamples\nsudo $0 root\nsudo $0 root zobi\nsudo $0 root zmktbl\nsudo $0 swap" + exit fi item=0 -seltxt= -rootpart= -swappart= +unset seltxt +unset rootpart +unset swappart if [[ "$2" == "dmktbl" ]] || [[ "$2" == "zmktbl" ]] then - [[ -d "/usr/share/OBI" ]] || mkdir -p "/usr/share/OBI" - partitions="/usr/share/OBI/partitions" ## changed - TITLE="$SelectpartitionUSING $targ" - TITLE2="zMktbl" - ZEN_ICON="--window-icon=$WINDOW_ICON" + partitions="$dpath/partitions" ## changed + TITLE="$SelectpartitionUSING $targ" + TITLE2="zMktbl" else - TITLE="$pgrmname $version - $SelectpartitionUSING $targ" - TITLE2="$OneButtonInstaller" - partitions="/usr/share/OBI/partitions" + TITLE="$pgrmname $version - $SelectpartitionUSING $targ" + TITLE2="$OneButtonInstaller" + partitions="$dpath/partitions" fi -prgnam="$OneButtonInstaller" -## Ubuntu ONLY version number -APTCACHE=$(which apt-cache) -if [[ -n "${APTCACHE}" ]] -then - ver_no=$(apt-cache policy obi-installer | grep 'Installed:') - ver_no="${ver_no/*Installed:}" - ver_no="${ver_no/ubuntu*}" - ver_no="${ver_no/~*}" - ver_no="${ver_no// }" - LOGecho "$ver_no" - version="$prgnam $ver_no" -fi -if [[ -z "${version}" ]] -then -## if we can't find apt-cache to grep the version just display the program name - version="$prgnam" -fi -# targ: either root or swap -# -# lsblkmod: dobi, zobi, dmktbl, zmktbl (where d-dialog, z-zenity) +## targ: either root or swap +## +## lsblkmod: dobi, zobi, dmktbl, zmktbl (where d-dialog, z-zenity) if [[ -n "$2" ]] then - lsblkmod="$2" + lsblkmod="$2" else - lsblkmod="dobi" + lsblkmod="dobi" fi [[ "$USEZENITY" == "true" ]] && lsblkmod=zobi declare -a headvar declare -a listvar declare -a bvar -aind= -memtxt= +unset aind +unset memtxt ####################################################################### lsblker() { -# declare array variables and open a temporary file - -tmpfil=$(mktemp) +## declare array variables and open a temporary file + tmpfil=$(mktemp) -# list mass storage devices (for the menu header) +## list mass storage devices (for the menu header) #echo "##### header with fixed width font" #sudo lsblk -o NAME,MODEL,SIZE|grep -e '^[^f]d.. ' -e '^NAME ' -sudo lsblk -o NAME,MODEL,SIZE|grep -e '^[^f]d.. ' -e '^NAME '|head -n1 > "$tmpfil" -sudo lsblk -no NAME,MODEL,SIZE|grep -e '^[^f]d.. ' -e '^NAME '|sort >> "$tmpfil" + sudo lsblk -o NAME,MODEL,SIZE|grep -e '^[^f]d.. ' -e '^NAME '|head -n1 > "$tmpfil" + sudo lsblk -no NAME,MODEL,SIZE|grep -e '^[^f]d.. ' -e '^NAME '|sort >> "$tmpfil" #echo "##### or to manage header when proportional font" #sudo lsblk -P -o NAME,MODEL,SIZE,TYPE|grep 'TYPE="disk"'|sort|sed 's/\ TYPE="disk"//' #sudo lsblk -P -o NAME,MODEL,SIZE,TYPE|grep 'TYPE="disk"'|sort|sed 's/\ TYPE="disk"//' > "$tmpfil" -jj=0 -mentxt= -while read headvar[jj] -do - headvar[jj]="${headvar[jj]// $}" + jj=0 + unset mentxt + while read headvar[jj] + do + headvar[jj]="${headvar[jj]// $}" # echo "${headvar[jj]}" - mentxt="$mentxt\n${headvar[jj]}" - jj=$((jj+1)) -done < "$tmpfil" + mentxt="$mentxt\n${headvar[jj]}" + jj=$((jj+1)) + done < "$tmpfil" #echo $jj -# list partitions (for the menu items) for dialog +## list partitions (for the menu items) for dialog -if [[ "$lsblkmod" == "dobi" ]] || [[ "$lsblkmod" == "dmktbl" ]] -then + if [[ "$lsblkmod" == "dobi" ]] || [[ "$lsblkmod" == "dmktbl" ]] + then # echo "##### list for the OBI installer in dialog mode" # sudo lsblk -o NAME,SIZE,TYPE,FSTYPE,LABEL,MOUNTPOINT|grep ^NAME|sed 's/^NAME /NAME/' \ # |sed 's/ TYPE / /' - sudo lsblk -o NAME,SIZE,TYPE,FSTYPE,LABEL,MOUNTPOINT|grep ^NAME|sed 's/^NAME /NAME/' \ + sudo lsblk -o NAME,SIZE,TYPE,FSTYPE,LABEL,MOUNTPOINT|grep ^NAME|sed 's/^NAME /NAME/' \ |sed 's/ TYPE / /' > "$tmpfil" # sudo lsblk -o NAME,SIZE,TYPE,FSTYPE,LABEL,MOUNTPOINT|grep -v ' 1K '|grep ' part ' \ # |sed 's/^..//'|sed 's/ part / /'|sort - sudo lsblk -o NAME,SIZE,TYPE,FSTYPE,LABEL,MOUNTPOINT|grep -v ' 1K '|grep ' part ' \ + sudo lsblk -o NAME,SIZE,TYPE,FSTYPE,LABEL,MOUNTPOINT|grep -v ' 1K '|grep ' part ' \ |sed 's/^..//'|sed 's/ part / /'|sort >> "$tmpfil" - bb=0 - while read string - do - bvar[bb]=${string%% *} - bvar[bb+1]=${string#* } - # bvar[bb+1]=${bvar[bb+1]// /.} - bb=$((bb+2)) - done < "$tmpfil" + bb=0 + while read string + do + bvar[bb]=${string%% *} + bvar[bb+1]=${string#* } + # bvar[bb+1]=${bvar[bb+1]// /.} + bb=$((bb+2)) + done < "$tmpfil" - aind=$((bb/2)) - height=$((aind+jj+7)) + aind=$((bb/2)) + height=$((aind+jj+7)) # echo $aind # echo ${bvar[@]} -# list partitions (for the menu items) for zenity +## list partitions (for the menu items) for zenity -elif [[ "$lsblkmod" == "zobi" ]] -then + elif [[ "$lsblkmod" == "zobi" ]] + then # echo "##### list for the OBI installer in zenity mode" # sudo lsblk -P -o NAME,SIZE,TYPE,FSTYPE,LABEL,MOUNTPOINT|grep -v 'SIZE="1K"'|grep 'TYPE="part"'|sort - sudo lsblk -P -o NAME,SIZE,TYPE,FSTYPE,LABEL,MOUNTPOINT|grep -v 'SIZE="1K"' \ + sudo lsblk -P -o NAME,SIZE,TYPE,FSTYPE,LABEL,MOUNTPOINT|grep -v 'SIZE="1K"' \ |grep 'TYPE="part"'|sort > "$tmpfil" -elif [[ "$lsblkmod" == "zmktbl" ]] -then + + elif [[ "$lsblkmod" == "zmktbl" ]] + then # echo "##### list for the OBI tarball maker zmktbl (limited to ext file systems)" # sudo lsblk -P -o NAME,SIZE,TYPE,FSTYPE,LABEL,MOUNTPOINT|grep 'FSTYPE="ext'|sort - sudo lsblk -P -o NAME,SIZE,TYPE,FSTYPE,LABEL,MOUNTPOINT|grep 'FSTYPE="ext'|sort > "$tmpfil" -fi + sudo lsblk -P -o NAME,SIZE,TYPE,FSTYPE,LABEL,MOUNTPOINT|grep 'FSTYPE="ext'|sort > "$tmpfil" + fi -jj=0 + jj=0 -#listvar is the zenity list -while read listvar[jj] listvar[jj+1] dummy listvar[jj+2] listvar[jj+3] listvar[jj+4] -do - listvar[jj]="${listvar[jj]}" - for (( ii=jj ; ii$mentxt" \ @@ -261,10 +248,10 @@ --ok-label "$partitionCHOICE $targ" --cancel-label "$Quit" \ --column="$NAME" --column="$SIZE" --column="$FSTYPE" --column="$LABEL" --column="$MOUNTPOINT" \ ${listvar[@]} 2> /dev/null) -elif [ "$lsblkmod" == "dobi" ] || [ "$lsblkmod" == "dmktbl" ] -then - ans=$(dialog \ +elif [[ "$lsblkmod" == "dobi" ]] || [[ "$lsblkmod" == "dmktbl" ]] +then + ans=$(dialog \ --no-shadow --backtitle "$TITLE" \ --title "$selectpartitionCHOICE $targ $scrollifnecessary \Z2v(+) or ^(-)\Zn" \ --default-item "$choice" --colors --ok-label "$partitionCHOICE $targ" --cancel-label "$Quit" \ @@ -273,11 +260,11 @@ fi -LOGecho "select-part2 after dialog or zenity: ans=$ans" +LOG_ECHO "after dialog or zenity: ans=$ans" ####################################################################### -# identify selection +## identify selection ## check answer for something like sda ## s="${ans:0:1}" ## d="${ans:1:1}" @@ -285,107 +272,103 @@ ## [[ "${ans:2:1}" == [a-zA-Z] ]] checks to make sure it is a letter if [[ "${ans:1:1}" == "d" ]] && [[ "${ans:2:1}" == [a-zA-Z] ]] then - if [[ "${targ,,}" == "root" ]] - then - rootpart="/dev/$ans" - elif [[ "${targ,,}" == "swap" ]] - then - swappart="/dev/$ans" - fi + if [[ "${targ,,}" == "root" ]] + then + rootpart="/dev/$ans" + elif [[ "${targ,,}" == "swap" ]] + then + swappart="/dev/$ans" + fi -LOGecho "rootpart=$rootpart swappart=$swappart" + LOG_ECHO "rootpart=$rootpart swappart=$swappart" -# select to have no swap partition +## select to have no swap partition elif [[ "$ans" == "$ans_n" ]] then - LOGecho "Selcted no swap in select-part2" -# wipe swap from partitions file! - unset swappart - echo ""> "$partitions" - if [[ -n "$rootpart" ]] - then - echo "obi-root:$rootpart" > "$partitions" - fi - - -#elif [ "$ans" == "w" ] -#then -# > "$partitions" -# exit + LOG_ECHO "Selcted no swap" +## wipe swap from partitions file! + unset swappart + echo ""> "$partitions" + if [[ -n "$rootpart" ]] + then + echo "obi-root:$rootpart" > "$partitions" + fi -# quit without writing +## quit without writing anything to the partitions file else - exit + exit fi -warnstr= +unset warnstr +## ROOT partition if [[ -z "$rootpart" ]] then - warnstr="$Youmustselectrootpartition" - echo "$warnstr" + warnstr="$Youmustselectrootpartition" + echo "$warnstr" else - df|grep "$rootpart" >/dev/null - retval=$? - if (( retval == 0 )) - then - umount "${rootpart/\ }" - retval=$? - if (( retval != 0 )) - then - warnstr="$thisdeviceismounted $rootpart + df|grep "$rootpart" >/dev/null + retval=$? + if (( retval == 0 )) + then + umount "${rootpart/\ }" + retval=$? + if (( retval != 0 )) + then + warnstr="$thisdeviceismounted $rootpart *** $Youmuststoptheprogramlockingit ***" - echo "$warnstr" - fi - fi + echo "$warnstr" + fi + fi fi + +## SWAP partiton if [[ -n "$swappart" ]] then - df|grep "$swappart" >/dev/null - retval=$? - if (( retval == 0 )) - then - umount "${swappart/\ }" - retval=$? - if (( retval != 0 )) - then - warnstr="$thisdeviceismounted $swappart + df|grep "$swappart" >/dev/null + retval=$? + if (( retval == 0 )) + then + umount "${swappart/\ }" + retval=$? + if (( retval != 0 )) + then + warnstr="$thisdeviceismounted $swappart *** $Youmuststoptheprogramlockingit ***" - echo "$warnstr" - fi - fi + echo "$warnstr" + fi + fi fi +## IF there is a warning string display it if [[ -n "$warnstr" ]] then - if [[ "$2" == "zobi" ]] || [[ "$2" == "zmktbl" ]] || [[ "$USEZENITY" == "true" ]] - then - zenity --class=OBI --warning --title="$TITLE2" "$ZEN_ICON" --text="$warnstr" 2> /dev/null - else - dialog --cr-wrap --msgbox "$warnstr" 8 50 - fi - exit + if [[ "$2" == "zobi" ]] || [[ "$2" == "zmktbl" ]] || [[ "$USEZENITY" == "true" ]] + then + zenity --class=OBI --warning --title="$TITLE2" "$ZEN_ICON" --text="$warnstr" 2> /dev/null + else + dialog --cr-wrap --msgbox "$warnstr" 8 50 + fi + exit fi -# write selection +## Write Selection if [[ -z "$swappart" ]] then - echo "obi-root:$rootpart" > "$partitions" + echo "obi-root:$rootpart" > "$partitions" elif [[ -z "$rootpart" ]] then - echo "obi-swap:$swappart" > "$partitions" + echo "obi-swap:$swappart" > "$partitions" elif [[ "$rootpart" != "$swappart" ]] then - echo "obi-root:$rootpart + echo "obi-root:$rootpart obi-swap:$swappart" > "$partitions" else - echo "obi-root:$rootpart" > "$partitions" + echo "obi-root:$rootpart" > "$partitions" fi -#echo select-part2 -LOGecho "$(cat $partitions)" -#pwd -#ls -l "$partitions" +## log the partitions file contents +LOG_ECHO "$( < $partitions)" diff -Nru obi-installer-3.3.0ubuntu0/OBI/select-tarball obi-installer-3.4.0ubuntu0/OBI/select-tarball --- obi-installer-3.3.0ubuntu0/OBI/select-tarball 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/select-tarball 2018-03-15 13:13:10.000000000 +0000 @@ -23,98 +23,85 @@ ## SPACE BAR and SLASH are keyboard keys spacebarcopyselectionslashshowcontent=$(eval_gettext "SPACE BAR: copy selection to text-entry window, SLASH: show directory content") Notarballfound=$(eval_gettext "No tarball found (tarballs/filename.tar.gz)") -ErrorfindingtheOBIselectedpath=$(eval_gettext "Error finding the OBI selected path") -Errorfindingthetarballpath=$(eval_gettext "Error finding the tarball path") ########################################################### -[[ -f "$HOME/usezenity" ]] && USEZENITY=$(cat "$HOME/usezenity") -ICONPATH="/usr/share/icons/hicolor/48x48/apps/obi-window-icon.png" -ZEN_ICON="--window-icon=$ICONPATH" -echoout() { - if [[ "$USEZENITY" == "true" ]] - then - echo -e "
[select-tarball]
$*" >> "${HOME}"/obi-installer.log - zenity --class=OBI --info --timeout=7 --title="$OneButtonInstaller" "$ZEN_ICON" --text="$*" - else - echo -e "[select-tarball] $*" >> "${HOME}"/obi-installer.log - dialog --infobox "$*" 0 0 - sleep .7 - fi + +################################################ +## Source our handy functions!! +## make sure they are in the PATH first +OBI_SHARE_DIR="/usr/share/OBI" +if [[ -d "${OBI_SHARE_DIR}" ]] && [[ "${PATH/$OBI_SHARE_DIR}" == "${PATH}" ]] +then + PATH="${PATH}:/usr/share/OBI" + export PATH +elif [[ "${PATH/$PWD}" == "${PATH}" ]] +then + PATH="${PATH}:${PWD}" + export PATH +fi +source obi-functions || exit +################################################ +ECHO() { + echoOut "select-tarball" "$*" } -LOGecho(){ - if [[ "$USEZENITY" == "true" ]] - then - echo -e "
[select-tarball]
$*" >> "${HOME}"/obi-installer.log - else - echo -e "[select-tarball] $*" >> "${HOME}"/obi-installer.log - fi +LOG_ECHO(){ + echoLOG "select-tarball" "$*" } +[[ -z "$USEZENITY" ]] && USEZENITY="$(getZenity)" +ICONPATH="$(getIcon)" +ZEN_ICON="--window-icon=$ICONPATH" +[[ -z "$dpath" ]] && dpath="$(getDpath)" +selected="$(selector_of_tarball_dir)" +tarpath="$(findTarballDirectory)" special_tarball_select() { -# check for tarballs -if [[ -d "/tarballs" ]] -then - tarpath="/tarballs" -elif [[ -d "${HOME}/tarballs" ]] -then - tarpath="${HOME}/tarballs" -elif [[ -d "${PWD}/tarballs" ]] -then - tarpath="${PWD}/tarballs" -else - echo "Error finding the tarball path" - tarpath="${HOME}" -fi - + # select tarball, go or quit + if [[ "$USEZENITY" == "true" ]] + then + unset ans + while [[ -z "$ans" ]] + do + ans=$(zenity --class=OBI --file-selection --file-filter=*.tar.[gx]z --filename="${tarpath}" --title="$Selecttarball - $avoidspacesintarballnames") + done + echo "$ans" > "$selected" + else + + tarstr="${tarpath}"/*.tar.[gx]z ## this is for a for loop + #tarstr=$(find / -name "*.tar.[gx]z") + for i in $tarstr + do + item=$((item + 1)) + seltxt="$seltxt$item \"$i\" " + done -# select tarball, go or quit -if [[ "$USEZENITY" == "true" ]] -then - unset ans - while [[ -z "$ans" ]] - do - ans=$(zenity --class=OBI --file-selection --file-filter=*.tar.[gx]z --filename="${tarpath}" --title="$Selecttarball - $avoidspacesintarballnames") - done - echo "$ans" > "$selected" -else - -tarstr="${tarpath}"/*.tar.[gx]z ## this is for a for loop -#tarstr=$(find / -name "*.tar.[gx]z") -for i in $tarstr -do - item=$((item + 1)) - seltxt="$seltxt$item \"$i\" " -done - ans=$(dialog --backtitle "$Selecttarball - $avoidspacesintarballnames" \ + ans=$(dialog --backtitle "$Selecttarball - $avoidspacesintarballnames" \ --title "$selecttarballwiththearrowkeysscrollifnecessary" \ --default-item "$choice" --colors --menu "$Availabletarballs" 17 76 $((item + 1)) \ "$seltxt" "$quit_key" "$Quitnotarballselected" 3>&1 1>&2 2>&3 3>&- ) -choice="$ans" -item=0 -for i in $tarstr -do - item=$((item + 1)) - targ0="$i" - if [[ "$item" == "$choice" ]] - then - target="$targ0" - fi -done + choice="$ans" + item=0 -if [[ "$ans" == "$quit_key" ]] || [[ -z "$ans" ]] -then - > "$selected" - exit -fi + for i in $tarstr + do + item=$((item + 1)) + targ0="$i" + if [[ "$item" == "$choice" ]] + then + target="$targ0" + fi + done + + if [[ "$ans" == "$quit_key" ]] || [[ -z "$ans" ]] + then + > "$selected" + exit + fi # write selection - -# echo "choice=$choice" -# echo "$target" -echo "$target" > "$selected" -fi + echo "$target" > "$selected" + fi } @@ -122,30 +109,29 @@ general_file_select() { #echo $tarball -if test -f "$tarball" -then - choice="$tarball" -else - choice="$PWD/" -fi -if [[ "$USEZENITY" == "true" ]] -then - unset ans - while [[ -z "$ans" ]] - do - ans=$(zenity --class=OBI --file-selection --title="$Selecttarball" --filename="$choice") - done -else -ans=$(dialog --backtitle \ + if [[ -f "$tarball" ]] + then + choice="$tarball" + else + choice="$PWD/" + fi + if [[ "$USEZENITY" == "true" ]] + then + unset ans + while [[ -z "$ans" ]] + do + ans=$(zenity --class=OBI --file-selection --title="$Selecttarball" --filename="$choice") + done + else + ans=$(dialog --backtitle \ "$spacebarcopyselectionslashshowcontent" --no-shadow \ --fselect "$choice" 8 78 3>&1 1>&2 2>&3 3>&- ) -fi -target="$ans" -# write selection + fi + target="$ans" -#echo "$target" -echo "$target" > "$selected" +# write selection + echo "$target" > "$selected" } ## main program ############################################## @@ -153,9 +139,9 @@ # variables choice=1 -cnt= ## what is this for?? -target= -tarball= +unset cnt ## what is this for?? +unset target +unset tarball LC_ALL=C LANG=C @@ -163,98 +149,70 @@ if [[ "$(whoami)" != "root" ]] then - echoout "$Usage\n$SelecttarballusewithOBI\nsudo $0" - exit -fi - -# check for previous selection -if [[ -f /usr/share/OBI/selected ]] -then - selected="/usr/share/OBI/selected" -elif [[ -f "${HOME}"/selected ]] -then - selected="${HOME}/selected" -elif [[ -f "${PWD}/selected" ]] -then - selected="${PWD}/selected" -else - selected="selected" - echo "$ErrorfindingtheOBIselectedpath" -fi - -if test -s "$selected" -then - read tarball < "$selected" + ECHO "$Usage\n$SelecttarballusewithOBI\nsudo $0" + exit fi -# check for tarballs -if [[ -d "/tarballs" ]] -then - tarpath="/tarballs" -elif [[ -d "${HOME}/tarballs" ]] +if [[ -s "$selected" ]] then - tarpath="${HOME}/tarballs" -elif [[ -d "${PWD}/tarballs" ]] -then - tarpath="${PWD}/tarballs" -else - LOGecho "$Errorfindingthetarballpath" + read tarball < "$selected" fi item=0 for source in "${tarpath}"/*.tar.[gx]z do - item=$((item + 1)) - if [[ ! -f "$source" ]] - then - if [[ "$USEZENITY" == "true" ]] - then - zenity --class=OBI --info "${ZEN_ICON}" --title="$OneButtonInstaller - $Selecttarball" --text="$Notarballfound" - else - dialog --backtitle "$OneButtonInstaller - $Selecttarball" --msgbox \ - "$Notarballfound" 0 0 - fi - tarball= - general_file_select - exit - elif ! test -s "$source" - then - if [[ "$USEZENITY" == "true" ]] - then - ans=$(zenity --class=OBI --question "${ZEN_ICON}" --title= "$OneButtonInstaller - $Selecttarball" --text="$Zerosizedtarballfound\n$source\n$Removeit" ) - ans="${ans:0:1}" - else - ans=$(dialog --backtitle "$OneButtonInstaller - $Selecttarball" --yesno "$Zerosizedtarballfound\n$source\n$Removeit" 0 0 3>&1 1>&2 2>&3 3>&- ) - fi - if [ "$?" == "0" ] - then - sudo rm "$source" - else - exit - fi - elif [[ "$tarball" == "$source" ]] - then - choice=$item - fi + item=$((item + 1)) + if [[ ! -f "$source" ]] + then + if [[ "$USEZENITY" == "true" ]] + then + zenity --class=OBI --info "${ZEN_ICON}" --title="$OneButtonInstaller - $Selecttarball" --text="$Notarballfound" + else + dialog --backtitle "$OneButtonInstaller - $Selecttarball" --msgbox "$Notarballfound" 0 0 + fi + unset tarball + general_file_select + exit + elif [[ ! -s "$source" ]] + then + if [[ "$USEZENITY" == "true" ]] + then + ans=$(zenity --class=OBI --question "${ZEN_ICON}" --title= "$OneButtonInstaller - $Selecttarball" --text="$Zerosizedtarballfound\n$source\n$Removeit" ) + retval="$?" + ans="${ans:0:1}" + else + ans=$(dialog --backtitle "$OneButtonInstaller - $Selecttarball" --yesno "$Zerosizedtarballfound\n$source\n$Removeit" 0 0 3>&1 1>&2 2>&3 3>&- ) + retval="$?" + fi + if (( retval == 0 )) + then + sudo rm "$source" + else + exit + fi + elif [[ "$tarball" == "$source" ]] + then + choice=$item + fi done # list for selection -ans= +unset ans item=0 -cmdsav= #what is this for??? -seltxt= +unset cmdsav #what is this for??? +unset seltxt # select function if [[ "$USEZENITY" != "true" ]] then - ans=$(dialog --backtitle "$OneButtonInstaller - $Selecttarball" \ + ans=$(dialog --backtitle "$OneButtonInstaller - $Selecttarball" \ --yes-label "$Tarballselectoreasy" --no-label "$GeneralFileselectordifficult" \ --yesno "$Selecttarballseasywithdifficult" 0 0 \ 3>&1 1>&2 2>&3 3>&- ) - case "$?" in - 0)special_tarball_select;; - *)general_file_select;; - esac + case "$?" in + 0)special_tarball_select;; + *)general_file_select;; + esac else - special_tarball_select + special_tarball_select fi diff -Nru obi-installer-3.3.0ubuntu0/OBI/setlevel obi-installer-3.4.0ubuntu0/OBI/setlevel --- obi-installer-3.3.0ubuntu0/OBI/setlevel 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/setlevel 2018-03-15 13:13:10.000000000 +0000 @@ -8,37 +8,38 @@ ADVANCED=$(eval_gettext "advanced") MENUtitle=$(eval_gettext "Prepare partitions with Gparted for the advanced method") Partitionsareselectedused=$(eval_gettext "Partitions are selected and used") -pgrmname=$(eval_gettext "One Button Installer") SelectOBIlevel=$(eval_gettext "Select OBI level") -OneButtonInstaller=$(eval_gettext "One Button Installer") ########################################################### -[[ -f "$HOME/usezenity" ]] && USEZENITY=$(cat "$HOME/usezenity") -ICONPATH="/usr/share/icons/hicolor/48x48/apps/obi-window-icon.png" -ZEN_ICON="--window-icon=$ICONPATH" -obilevel="obilevel" -LOGecho(){ - if [ "$USEZENITY" == "true" ] - then - echo -e "
[setlevel]
$*" >> "${HOME}"/obi-installer.log - else - echo -e "[setlevel] $*" >> "${HOME}"/obi-installer.log - fi + +################################################ +## Source our handy functions!! +## make sure they are in the PATH first +OBI_SHARE_DIR="/usr/share/OBI" +if [[ -d "${OBI_SHARE_DIR}" ]] && [[ "${PATH/$OBI_SHARE_DIR}" == "${PATH}" ]] +then + PATH="${PATH}:/usr/share/OBI" + export PATH +elif [[ "${PATH/$PWD}" == "${PATH}" ]] +then + PATH="${PATH}:${PWD}" + export PATH +fi +source obi-functions || exit +################################################ +LOG_ECHO(){ + echoLOG "setlevel" "$*" } +[[ -z "$USEZENITY" ]] && USEZENITY="$(getZenity)" +ICONPATH="$(getIcon)" +ZEN_ICON="--window-icon=$ICONPATH" + +version="$(getVersion)" +[[ -z "$dpath" ]] && dpath="$(getDpath)" + +obilevel="$dpath/obilevel" + LC_ALL=C LANG=C -if [[ -z "$version" ]] -then - [[ -z "$prgnam" ]] && prgnam="$OneButtonInstaller" - APTCACHE=$(which apt-cache) - if [[ -n "${APTCACHE}" ]] - then - ver_no=$(apt-cache policy one-button-installer | grep Installed: | sed 's/Installed://' | sed 's/ubuntu.*//') - version="$prgnam $ver_no" - else -## if we can't find apt-cache to grep the version just display the program name - version="$prgnam" - fi -fi if [[ -f "$obilevel" ]] then @@ -50,7 +51,7 @@ else choice=basic fi -Titlte="$pgrmname $version - $SelectOBIlevel" +Titlte="$version - $SelectOBIlevel" if [[ "$USEZENITY" == "true" ]] then @@ -72,5 +73,5 @@ "$ADVANCED")choice=advanced;; *)choice=basic;; esac -LOGecho "using: $choice" +LOG_ECHO "using: $choice" echo "$choice" | sudo tee "$obilevel" diff -Nru obi-installer-3.3.0ubuntu0/OBI/starter obi-installer-3.4.0ubuntu0/OBI/starter --- obi-installer-3.3.0ubuntu0/OBI/starter 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/starter 2018-03-15 13:13:10.000000000 +0000 @@ -1,5 +1,8 @@ #!/bin/bash -. gettext.sh +eval_gettext(){ + echo -e "$*" +} +source gettext.sh export TEXTDOMAIN=obi-installer # author sudodus alias nio-wiklund at launchpad @@ -15,10 +18,9 @@ # 2015-09-12 israeldahl began gettext work # 2015-09-26 israeldahl began zenity work ########################################################### -Errorfindingthetarballpathusing=$(eval_gettext "Error finding the tarball path using") TarballPath=$(eval_gettext "Tarball path") TextnotfoundChangedirectory=$(eval_gettext "OBI text not found. Change directory") -exittothebashshell=$(eval_gettext "Exit to the Shell") +exittothebashshell=$(eval_gettext "Exit OBI") closewindow=$(eval_gettext "Close Window") tomakethetarballs=$(eval_gettext "to make the tarballs") OneButtonInstaller=$(eval_gettext "One Button Installer") @@ -27,7 +29,6 @@ UnlabeledOStoinstall=$(eval_gettext "Unlabeled OS to install") Notarballselected=$(eval_gettext "No tarball selected") HadtofindatarballOBIfound=$(eval_gettext "Had to find a tarball.. OBI found") -ErrorfindingtheOBIpath=$(eval_gettext "Error finding the OBI path") StarterMenu=$(eval_gettext "Starter Menu") Pleaseselectanactionwithaletterkeyorthearrowkeys=$(eval_gettext "Please select an action with a letter key or the arrow keys") Quit=$(eval_gettext "Quit") @@ -95,6 +96,14 @@ Hotkey=$(eval_gettext "Hotkey") # END ########################################################### +if [[ -d "/usr/share/OBI" ]] +then + PATH="${PATH}:/usr/share/OBI" + export PATH +else + PATH="${PATH}:${PWD}" + export PATH +fi # tweak for link /tarballs when persistence by mkusb for i in /lib/live/mount/persistence/sd** @@ -108,86 +117,48 @@ done ######################################################################## USEZENITY="FALSE" - +clearOBI 2>/dev/null case $1 in - "usezenity"|"-z"|"--zenity")[[ -n "$(which zenity)" ]] && echo "true" > "$HOME/usezenity";; + "usezenity"|"-z"|"--zenity") +USEZENITY="true" +[[ -n "$(which zenity 2>/dev/null)" ]] && echo "true" > "$HOME/usezenity";; *)[[ -f "$HOME/usezenity" ]] && rm "$HOME/usezenity";; esac -[[ -f "$HOME/usezenity" ]] && USEZENITY=$( < "$HOME/usezenity") -ICONPATH="/usr/share/icons/hicolor/48x48/apps/obi-window-icon.png" -ZEN_ICON="--window-icon=$ICONPATH" -echoout() { - if [[ "$USEZENITY" == "true" ]] - then - zenity --class=OBI --info --timeout=7 --title="$OneButtonInstaller" "$ZEN_ICON" --text="$*" - retval="$?" - echo -e "
[starter]
$*" >> "${HOME}"/obi-installer.log - [[ "$retval" != 0 ]] && echo -e "
[starter]
CANCELED" >> "${HOME}"/obi-installer.log && exit - else - dialog --infobox "$*" 0 0 - sleep .7 - echo -e "[starter] $*" >> "${HOME}"/obi-installer.log - fi +################################################ +## Source our handy functions!! +source obi-functions || exit 1 +CHROOT=$(chrootDirectory "${CHROOT}") +################################################ +startLOG +starterECHO() { + echoOut "starter" "$*" ## in obi-functions } -LOGecho(){ - if [[ "$USEZENITY" == "true" ]] - then - echo -e "
[starter]
$*" >> "${HOME}"/obi-installer.log - else - echo -e "[starter] $*" >> "${HOME}"/obi-installer.log - fi +LOGstarterECHO(){ + echoLOG "starter" "$*" ## in obi-functions } -[[ "$USEZENITY" == "true" ]] && echo "">> "${HOME}"/obi-installer.log -clearOBI + +## common variables +[[ -z "$USEZENITY" ]] && USEZENITY="$(getZenity)" +ICONPATH="$(getIcon)" +ZEN_ICON="--window-icon=$ICONPATH" +tailfile="${HOME}/.obi-progress" +[[ "$USEZENITY" == "true" ]] && echo "">> "${HOME}"/obi-installer.html tailfile="${HOME}"/.obi-progress BG_COLOUR="white" ## use bash builtin method < instead of cat -SVGSPLASH="$( < /usr/share/icons/hicolor/scalable/apps/obi-splash-screen.svg)" +ICON_DIR="$(getXDGdir icons)" +SVGSPLASH="$( < $ICON_DIR//hicolor/scalable/apps/obi-splash-screen.svg)" BG_COLOUR_SPLASH="blue" [[ -z "${LANG}" ]] && LANG=C [[ -z "${LC_ALL}" ]] && LC_ALL=C LANGUAGE=$LC_ALL:$LANG:en_US export LANGUAGE +version="$(getVersion)" +dpath="$(getDpath)" +[[ -z "$dpath" ]] && starterECHO "${dialogMESSAGE}\n$TextnotfoundChangedirectory" && exit 1 -if [[ -f "/home/$USER/obi.txt" ]] -then - dpath="/home/$USER" -elif [[ -f "${HOME}/obi.txt" ]] -then - dpath="${HOME}" -elif [[ -f "${PWD}/obi.txt" ]] -then - dpath="${PWD}" -elif [[ -f /usr/share/OBI/obi.txt ]] -then - dpath="/usr/share/OBI" -else - echoout "${dialogMESSAGE}\n$TextnotfoundChangedirectory" - exit 1 -fi - -prgnam="$OneButtonInstaller" -## Ubuntu ONLY version number -APTCACHE=$(which apt-cache) -if [[ -n "${APTCACHE}" ]] -then - ver_no=$(apt-cache policy obi-installer | grep 'Installed:') - ver_no="${ver_no/*Installed:}" - ver_no="${ver_no/ubuntu*}" - ver_no="${ver_no/~*}" - ver_no="${ver_no// }" - LOGecho "$ver_no" - version="$prgnam $ver_no" -fi - -if [[ -z "${version}" ]] -then -## if we can't find apt-cache to grep the version just display the program name - version="$prgnam" -fi - ## Intro Logo if [[ "$USEZENITY" == "true" ]] then @@ -198,43 +169,21 @@
" - (echo "$OBILOGO") | zenity --class=OBI --text-info --html --filename="/dev/stdin" --height=275 --width=245 "${ZEN_ICON}" --title "$version - $Splash" --timeout 2 + (echo "$OBILOGO") | zenity --class=OBI --text-info --html --filename="/dev/stdin" --height=275 --width=245 "${ZEN_ICON}" --title "$version - $Splash" --timeout 2 2>/dev/null else obitxt="$dpath/obi.txt" dialog --backtitle "$version - $Splash" \ --timeout 3 --exit-label "$OK" --textbox "$obitxt" 0 0 fi -tiptxt="tips.txt" -selected="selected" -obilevel="obilevel" +tiptxt="$dpath/tips.txt" +selected="$dpath/selected" +obilevel="$dpath/obilevel" # check for tarballs -dialogMESSAGE="" -## tarball path -if [[ -d "/tarballs" ]] -then - tarpath="/tarballs" -elif [[ -d "/lib/live/mount/medium/live/tarballs/" ]] -then - tarpath="/lib/live/mount/medium/live/tarballs/" -elif [[ -d "/lib/live/mount/persistence/sda4/live/tarballs/" ]] -then - tarpath="/lib/live/mount/persistence/sda4/live/tarballs/" -elif [[ -d "${HOME}/tarballs" ]] -then - tarpath="${HOME}/tarballs" -elif [[ -d "${PWD}/tarballs" ]] -then - tarpath="${PWD}/tarballs" -else - tarpath="${PWD}" - dialogMESSAGE="$Errorfindingthetarballpathusing: ${PWD}" -fi +tarpath="$(findTarballDirectory)" dialogMESSAGE="${dialogMESSAGE}\n$TarballPath: $tarpath" -## functions sourced from another file -source "$dpath/functions" if [[ "obi$DISPLAY" == "obi" ]] then mktar="mktbl" @@ -257,7 +206,7 @@ obitxt="$dpath/$obitxt" -LOGecho "${dialogMESSAGE}" +LOGstarterECHO "${dialogMESSAGE}" ##Took this out for OEM install #User and password for installed system\n @@ -276,7 +225,7 @@ " MSG="${MSG//\\Zn/
}" MSG="${MSG//\\n/
}" - echo "$MSG" | zenity --class=OBI --text-info --title="$OneButtonInstaller" "$ZEN_ICON" --html --width=700 --height=377 --filename="/dev/stdin" + echo "$MSG" | zenity --class=OBI --text-info --title="$OneButtonInstaller" "$ZEN_ICON" --html --width=700 --height=377 --filename="/dev/stdin" 2>/dev/null else dialog --colors --no-shadow \ --backtitle "$version - $WelcomeandWarning" --msgbox "$MSG" 0 0 @@ -285,40 +234,12 @@ #0 0 -if [[ -f "/home/$USER/obi" ]] -then - dpath="/home/$USER" -elif [[ -f "$PWD/obi" ]] -then - dpath="$PWD" -elif [[ -f "${HOME}/obi" ]] -then - dpath="${HOME}" -elif [[ -f "/usr/share/OBI/obi" ]] -then - dpath="/usr/share/OBI" -else - echoout "$ErrorfindingtheOBIpath" - exit 1 -fi - [[ "$USEZENITY" != "true" ]] && sudo "$dpath/init-dialog" tiptxt="$dpath/$tiptxt" + # check for selected -if [[ -f /usr/share/OBI/selected ]] -then - selected="/usr/share/OBI/selected" -elif [[ -f "$HOME/selected" ]] -then - selected="$HOME/selected" -elif [[ -f "$PWD/selected" ]] -then - selected="$PWD/selected" -else - LOGecho "[ERROR] searching for selected\n$ErrorfindingtheOBIpath" -fi -dialogMESSAGE="" #${dialogMESSAGE}\n +selected="$(selector_of_tarball_dir)" checkTarballs(){ # fancy dance-y check for tarballs to fix mkusb persistence @@ -385,7 +306,7 @@ thistarbqall=$( < "$selected") if [[ "$USEZENITY" == "true" ]]&& [[ -n "$thistarbqall" ]] then - zenity --class=OBI --question --title="$OneButtonInstaller" "$ZEN_ICON" --text="$Isthisatarballyouwanttouse\n$thistarbqall" + zenity --class=OBI --question --title="$OneButtonInstaller" "$ZEN_ICON" --text="$Isthisatarballyouwanttouse\n$thistarbqall" 2>/dev/null case $? in 0) an2="y";; *) an2="n";; @@ -462,7 +383,7 @@ obi_system="$thisOS" echo "$obi_system" > "$HOME/OSname" - [[ -n "${dialogMESSAGE}" ]] && LOGecho "${dialogMESSAGE}" + [[ -n "${dialogMESSAGE}" ]] && LOGstarterECHO "${dialogMESSAGE}" cd "$dpath" @@ -489,7 +410,7 @@ "$ans_o" " $level $OBIlevel ($BASIC / $ADVANCED)" \ "$ans_q" " $Quitfromthismenu ($quit_msg)" \ "$ans_r" " $Reboot" \ -"$ans_p" " $Poweroff") +"$ans_p" " $Poweroff" 2>/dev/null) ans="${ans:0:1}" else ## BASIC MENU @@ -502,7 +423,7 @@ "$ans_o" " $level $OBIlevel ($BASIC / $ADVANCED)" \ "$ans_q" " $Quitfromthismenu ($quit_msg)" \ "$ans_r" " $Reboot" \ -"$ans_p" " $Poweroff") +"$ans_p" " $Poweroff" 2>/dev/null) fi retval=$? ans="${ans:0:1}" @@ -549,7 +470,7 @@ fi fi - LOGecho "starter chose: $ans" + LOGstarterECHO "starter chose: $ans" ## the multiple if/then's were getting confusing changed to case ## all choices with $dpath execute scripts in this directory @@ -561,7 +482,7 @@ "$ans_a") echo "0 #OBI progress" > "$tailfile" echo "$ADVANCED" | sudo tee "$obilevel" - sudo "$dpath/obi" + sudo "$dpath/obi" "$obi_system" "$tarball" "$CHROOT" ;; "$ans_i") echo "0 #OBI progress" > "$tailfile" @@ -578,7 +499,7 @@ "$ans_t") if [[ "$USEZENITY" == "true" ]] then - zenity --class=OBI --text-info "${ZEN_ICON}" --title="$version - $Tipsusearrowkeystoscroll" --width=540 --height=470 --filename="$tiptxt" + zenity --class=OBI --text-info "${ZEN_ICON}" --title="$version - $Tipsusearrowkeystoscroll" --width=540 --height=470 --filename="$tiptxt" 2>/dev/null else dialog --backtitle "$version - $Tipsusearrowkeystoscroll" \ --textbox "$tiptxt" 17 76 diff -Nru obi-installer-3.3.0ubuntu0/OBI/text-mode-menu obi-installer-3.4.0ubuntu0/OBI/text-mode-menu --- obi-installer-3.3.0ubuntu0/OBI/text-mode-menu 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/text-mode-menu 2018-03-15 13:13:10.000000000 +0000 @@ -4,52 +4,106 @@ # # date editor comment # 2014-05-19 sudodus created for 9w - -LC_ALL=C;LANG=C +eval_gettext(){ + echo -e "$*" +} +source gettext.sh +export TEXTDOMAIN=obi-installer obitxt="obi.txt" - -if test -f /root/obi.txt; then dpath=/$USER -elif test -f ./obi.txt; then dpath=. -else echo "text not found. Change directory!" +if [[ -f "/usr/share/OBI/obi.txt" ]] +then + dpath="/usr/share/OBI" +elif [[ -f /root/obi.txt ]] +then + dpath="/$USER" +elif [[ -f ./obi.txt ]] +then + dpath="$PWD" +else + echo "$textnotfoundChangedirectory" fi +retval=0 +##TODO make localization work first... +while (( retval != 0 )) +do +## choose locale and keyboard + "$dpath"/locale-lister + retval="$?" +done +########################################################### +PAEflagdetected=$(eval_gettext "PAE flag detected") +NoPAEflagfound=$(eval_gettext "No PAE flag found") +ans_q=$(eval_gettext "q") +ans_o=$(eval_gettext "o") +ans_r=$(eval_gettext "r") +ans_g=$(eval_gettext "g") +ans_p=$(eval_gettext "p") +Quit=$(eval_gettext "Quit") +OneButtonInstallertextmodeMenu=$(eval_gettext "One Button Installer text mode Menu") +Pleaseselectanalternativewithaletterkeyorthearrowkeys=$(eval_gettext "Please select an alternative with a letter key or the arrow keys") +GraphicsmodewithGpartedandOneButtonInstaller=$(eval_gettext "Graphical mode with One Button Installer") +OneButtonInstallerintextmodeifverylowRAM=$(eval_gettext "One Button Installer in text mode (if very low RAM)") +Quitfromthismenuexittothebashshell=$(eval_gettext "Quit from this menu (exit to the bash shell)") +Reboot=$(eval_gettext "Reboot") +Poweroff=$(eval_gettext "Poweroff") +TotalRAM=$(eval_gettext "Total RAM") +UsedRAM=$(eval_gettext "Used RAM") +textnotfoundChangedirectory=$(eval_gettext "text not found. Change directory!") +Itseemsyouarerunninginsideagraphicalenvironmentalready=$(eval_gettext "It seems you are running inside a graphical environment already") +########################################################### + +## set the language to C for the script AFTER localization +LC_ALL=C +LANG=C + + obitxt="$dpath/$obitxt" ans="dummy" -while [ "$ans" != "q" ] && [ "$ans" != "" ] +while [[ "$ans" != "$ans_q" ]] && [[ -n "$ans" ]] do - grep pae /proc/cpuinfo > /dev/null - if [ $? -eq 0 ] - then - pflag="\Z4PAE flag detected\Zn" - else - pflag="\Z1No PAE flag found\Zn" - fi - ram=$(free -m|grep Mem:|tr -s ' ' ' '|cut -d ' ' -f2) - used=$(free -m|grep 'buffers/cache'|tr -s ' ' ' '|cut -d ' ' -f3) - menutitle="Total RAM = $ram MiB, Used RAM = $used MiB; $pflag" - -ans=$(dialog --no-shadow --backtitle "One Button Installer in 9w - text mode Menu" \ ---title "Please select an alternative with a letter key or the arrow keys" \ ---colors --cancel-label Quit --menu "$menutitle" 18 76 11 \ -g " Graphics mode with Gparted and One Button Installer" \ -o " One Button Installer in text mode (if very low RAM)" \ -q " Quit from this menu (exit to the bash shell)" \ -r " Reboot" \ -p " Poweroff" \ + grep pae /proc/cpuinfo > /dev/null + + if (( $? == 0 )) + then + pflag="\Z4$PAEflagdetected\Zn" + else + pflag="\Z1$NoPAEflagfound\Zn" + fi + + ram=$(free -m|grep 'Mem:'|tr -s ' ' ' '|cut -d ' ' -f2) + used=$(free -m|grep 'Mem:'|tr -s ' ' ' '|cut -d ' ' -f3) + + menutitle="$TotalRAM = $ram MiB, $UsedRAM = $used MiB; $pflag" +##TODO: support more than just dialog, like whiptail and others, just to make it more flexible + ans=$(dialog --no-shadow --backtitle "$OneButtonInstallertextmodeMenu" \ +--title "$Pleaseselectanalternativewithaletterkeyorthearrowkeys" \ +--colors --cancel-label "$Quit" --menu "$menutitle" 18 76 11 \ +"$ans_g" " $GraphicsmodewithGpartedandOneButtonInstaller" \ +"$ans_o" " $OneButtonInstallerintextmodeifverylowRAM" \ +"$ans_q" " $Quitfromthismenuexittothebashshell" \ +"$ans_r" " $Reboot" \ +"$ans_p" " $Poweroff" \ 3>&1 1>&2 2>&3 3>&- ) -# read -n 1 -s ans - if [ "$ans" == "o" ] - then - sudo "$dpath/starter" - elif [ "$ans" == "g" ] && [ "$TERM" == "linux" ] - then - sudo startx - elif [ "$ans" == "r" ] - then - sudo reboot - elif [ "$ans" == "p" ] - then - sudo poweroff - fi + case $ans in + "$ans_o")sudo "$dpath/starter";; + "$ans_g") + if [[ "$TERM" == "linux" ]] && [[ -z "$DISPLAY" ]] + then + sudo startx 2>/dev/null + else + if [[ -n "$DISPLAY" ]] + then + dialog --infobox "$Itseemsyouarerunninginsideagraphicalenvironmentalready" 0 0 + sleep .7 + exit 1 + fi + sudo startx 2>/dev/null + fi + ;; + "$ans_r")torios-reboot || sudo reboot;; + "$ans_p")torios-shutdown || sudo poweroff;; + esac done +exit 0 diff -Nru obi-installer-3.3.0ubuntu0/OBI/TODO obi-installer-3.4.0ubuntu0/OBI/TODO --- obi-installer-3.3.0ubuntu0/OBI/TODO 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/TODO 2018-03-15 13:13:10.000000000 +0000 @@ -1,518 +1,506 @@ -In /home/dahl/bzr/one-button-installer/OBI/autoselect line 13: -obi-swap:$swappart" | tee "$partitions" - ^-- SC2154: partitions is referenced but not assigned. -In /home/dahl/bzr/one-button-installer/OBI/clean-myself.bash line 9: -ans= -^-- SC2034: ans appears unused. Verify it or export it. +In clean-myself.bash line 8: +read ans + ^-- SC2034: ans appears unused. Verify it or export it. -In /home/dahl/bzr/one-button-installer/OBI/confirm-partition line 167: -target= ## what is this for? -^-- SC2034: target appears unused. Verify it or export it. - ^-- SC1007: Remove space after = if trying to assign a value (for empty string, use var='' ... ). - - -In /home/dahl/bzr/one-button-installer/OBI/confirm-partition line 172: -tmpstr= ## what is this for?? -^-- SC2034: tmpstr appears unused. Verify it or export it. - ^-- SC1007: Remove space after = if trying to assign a value (for empty string, use var='' ... ). - - -In /home/dahl/bzr/one-button-installer/OBI/confirm-partition line 582: +In confirm-partition line 496: cnt="count=$count" ## what is this for?? ^-- SC2034: cnt appears unused. Verify it or export it. -In /home/dahl/bzr/one-button-installer/OBI/dltbl line 186: + +In dltbl line 169: for i in $(grep "tarballs" $md5file|cut -d / -f 2) ^-- SC2013: To read lines rather than words, pipe/redirect to a 'while read' loop. -In /home/dahl/bzr/one-button-installer/OBI/dltbl line 191: - seltxt="$seltxt$item \"$i\" " - ^-- SC2089: Quotes/backslashes will be treated literally. Use an array. +In dltbl line 199: +for i in $(grep "tarballs" "$md5file"|cut -d / -f 2) + ^-- SC2013: To read lines rather than words, pipe/redirect to a 'while read' loop. -In /home/dahl/bzr/one-button-installer/OBI/dltbl line 201: - ans=$(zenity --class=OBI --list "${ZEN_ICON}" --width=420 --height=480 --title "$OneButtonInstaller $version - $Downloadtarball" --text="$Pleaseselectatarballwiththearrowkeysscrollifnecessary" --column="$HOTKEY" --column="$Availabletarballs" ${conent[@]}) - ^-- SC2068: Double quote array expansions, otherwise they're like $* and break on spaces. +In grub-installer line 76: + if [[ -n "$target" ]] + ^-- SC2154: target is referenced but not assigned. -In /home/dahl/bzr/one-button-installer/OBI/dltbl line 209: -$seltxt "$ans_q" "$Quit" 3>&1 1>&2 2>&3 3>&- ) -^-- SC2090: Quotes/backslashes in this variable will not be respected. -^-- SC2086: Double quote to prevent globbing and word splitting. +In hw-progress line 153: + [[ -f "$hwLOGGe" ]] && [[ -n "$( < $hwLOGGe)" ]] && LOG_ECHO "LOG:\n$( < $hwLOGGe)" + ^-- SC2086: Double quote to prevent globbing and word splitting. + ^-- SC2086: Double quote to prevent globbing and word splitting. -In /home/dahl/bzr/one-button-installer/OBI/dltbl line 216: -for i in $(grep "tarballs" "$md5file"|cut -d / -f 2) - ^-- SC2013: To read lines rather than words, pipe/redirect to a 'while read' loop. +In ldeb line 1: +ls $* live_boot*/*.iso|tr -s ' ' ' '| cut -d ' ' -f 5- +^-- SC2148: Tips depend on target shell and yours is unknown. Add a shebang. +^-- SC2012: Use find instead of ls to better handle non-alphanumeric filenames. + ^-- SC2048: Use "$@" (with quotes) to prevent whitespace problems. + ^-- SC2086: Double quote to prevent globbing and word splitting. -In /home/dahl/bzr/one-button-installer/OBI/functions line 167: - echo "ls -l /dev/disk/by-id| grep [a-z]$|tr -s ' ' ' ' \" >> "$hlptxt" - ^-- SC2129: Consider using { cmd1; cmd2; } >> file instead of individual redirects. +In limg line 1: +ls $* live_boot*/image/live/*.img.*|tr -s ' ' ' '| cut -d ' ' -f 5- +^-- SC2148: Tips depend on target shell and yours is unknown. Add a shebang. +^-- SC2012: Use find instead of ls to better handle non-alphanumeric filenames. + ^-- SC2048: Use "$@" (with quotes) to prevent whitespace problems. + ^-- SC2086: Double quote to prevent globbing and word splitting. -In /home/dahl/bzr/one-button-installer/OBI/functions line 171: - ls -l /dev/disk/by-id| grep "[a-z]$"|tr -s ' ' ' ' \ - ^-- SC2010: Don't use ls | grep. Use a glob or a for loop with a condition to allow non-alphanumeric filenames. +In list_drives line 38: +ls -l /dev/disk/by-id| grep "[a-z]$"|tr -s ' ' ' '|cut -d ' ' -f 9,11 \ +^-- SC2010: Don't use ls | grep. Use a glob or a for loop with a condition to allow non-alphanumeric filenames. -In /home/dahl/bzr/one-button-installer/OBI/functions line 172: - |cut -d ' ' -f 9,11|sort -k2|grep -e \^a -e \^u \ - ^-- SC1001: This \^ will be a regular '^' in this context. - ^-- SC1001: This \^ will be a regular '^' in this context. +In list_drives line 39: +|sort -k2|grep -e \^a -e \^u|sed 's#../..#/dev#' > "$tmpfil" + ^-- SC1001: This \^ will be a regular '^' in this context. + ^-- SC1001: This \^ will be a regular '^' in this context. -In /home/dahl/bzr/one-button-installer/OBI/functions line 274: - pvplug=false ## what is this for?? - ^-- SC2034: pvplug appears unused. Verify it or export it. +In list_drives line 51: +while read device dum1 dum2 bytesize + ^-- SC2034: dum1 appears unused. Verify it or export it. + ^-- SC2034: dum2 appears unused. Verify it or export it. -In /home/dahl/bzr/one-button-installer/OBI/functions line 496: - ufl=d ## what is this for?? - ^-- SC2034: ufl appears unused. Verify it or export it. +In locale-lister line 37: +SelectLANG=$(eval_gettext "Select Language") +^-- SC2034: SelectLANG appears unused. Verify it or export it. -In /home/dahl/bzr/one-button-installer/OBI/functions line 502: -MSG=" \Z1$WARNING $Unmountthetargetdeviceifmounted\Zn +In locale-lister line 43: +[[ -f "$HOME/usezenity" ]] && USEZENITY="$( < $HOME/usezenity)" + ^-- SC2086: Double quote to prevent globbing and word splitting. -$tmpstr -$usbstr" - ^-- SC2154: usbstr is referenced but not assigned. +In locale-lister line 91: + ans=$(zenity --list --height=400 --width=300 --text="$SelectLanguage" --title="$SelectLanguage" --column="$Code" --column="$Name" "${LIST[@]}" 2>/dev/null) + ^-- SC2154: SelectLanguage is referenced but not assigned. -In /home/dahl/bzr/one-button-installer/OBI/functions line 506: -='color:$WARN_COLOR;'>}" - ^-- SC2016: Expressions don't expand in single quotes, use double quotes for that. +In locale-lister line 95: + if (( $var & 1 )) + ^-- SC2004: $/${} is unnecessary on arithmetic variables. -In /home/dahl/bzr/one-button-installer/OBI/functions line 553: - for unmountDEV in $(grep "$DEVICE" /etc/mtab|sed s#\ /.*##) - ^-- SC2013: To read lines rather than words, pipe/redirect to a 'while read' loop. +In locale-lister line 100: + ans=$(dialog --no-shadow --backtitle "$SelectLanguage" --title "$SelectLanguage" --wmclass "OBI" --menu "$SelectLanguage" 19 76 12 ${LIST[@]} 3>&1 1>&2 2>&3 3>&-) + ^-- SC2068: Double quote array expansions, otherwise they're like $* and break on spaces. -In /home/dahl/bzr/one-button-installer/OBI/functions line 627: - bind=$(($bind + 1)) - ^-- SC2004: $/${} is unnecessary on arithmetic variables. +In memer line 7: +sum=$(($parts)) + ^-- SC2004: $/${} is unnecessary on arithmetic variables. -In /home/dahl/bzr/one-button-installer/OBI/functions line 629: - bind=$(($bind + 1)) - ^-- SC2004: $/${} is unnecessary on arithmetic variables. +In memer line 8: +sum=$(($sum *1024)) + ^-- SC2004: $/${} is unnecessary on arithmetic variables. -In /home/dahl/bzr/one-button-installer/OBI/functions line 682: -if [[ "$source" == "/dev/zero" ]] - ^-- SC2154: source is referenced but not assigned. +In memer line 9: +if (( $sum == 0 )) + ^-- SC2004: $/${} is unnecessary on arithmetic variables. -In /home/dahl/bzr/one-button-installer/OBI/functions line 913: - ch_item="$ans" - ^-- SC2034: ch_item appears unused. Verify it or export it. -In /home/dahl/bzr/one-button-installer/OBI/grub-installer line 17: -quitinstalling=$(eval_gettext "quit installing") -^-- SC2034: quitinstalling appears unused. Verify it or export it. +In mkp line 191: + Dev="$1" + ^-- SC2034: Dev appears unused. Verify it or export it. -In /home/dahl/bzr/one-button-installer/OBI/grub-installer line 115: - else ufl=d - ^-- SC2034: ufl appears unused. Verify it or export it. +In mkp line 203: + diskms=$(($diskmin*1000*1000*1000/$SectorSize)) + ^-- SC2004: $/${} is unnecessary on arithmetic variables. + ^-- SC2004: $/${} is unnecessary on arithmetic variables. -In /home/dahl/bzr/one-button-installer/OBI/grub-installer line 204: - cmdsav="${atxt[$choice]}" - ^-- SC2034: cmdsav appears unused. Verify it or export it. +In mkp line 209: + ram=$(($ram)) + ^-- SC2004: $/${} is unnecessary on arithmetic variables. -In /home/dahl/bzr/one-button-installer/OBI/hw-progress line 21: - zenity --class=OBI --info --timeout=7 --title="$OneButtonInstaller" "$ZEN_ICON" --text="[ERROR]::$*" - ^-- SC2154: OneButtonInstaller is referenced but not assigned. +In mkp line 210: + sectsize="$(getSectorSize $Device)" + ^-- SC2086: Double quote to prevent globbing and word splitting. -In /home/dahl/bzr/one-button-installer/OBI/hw-progress line 59: - rm -Rf "$CHROOT/$firmdir" - ^-- SC2115: Use "${var:?}" to ensure this never expands to / . +In mkp line 211: + sectsize=$(($sectsize)) + ^-- SC2004: $/${} is unnecessary on arithmetic variables. -In /home/dahl/bzr/one-button-installer/OBI/hw-progress line 99: -curlang="$LANG" -^-- SC2034: curlang appears unused. Verify it or export it. +In mkp line 229: + sectors="$(getSectors $Device)" + ^-- SC2086: Double quote to prevent globbing and word splitting. -In /home/dahl/bzr/one-button-installer/OBI/hw-progress line 131: -[[ -n "${LIST[*]}" ]] && COMMAND="$COMMAND ${LIST[@]}" - ^-- SC2124: Assigning an array to a string! Assign as array, or use * instead of @ to concatenate. +In mkp line 230: + sectsize="$(getSectorSize $Device)" + ^-- SC2086: Double quote to prevent globbing and word splitting. -In /home/dahl/bzr/one-button-installer/OBI/hw-progress line 152: -cleanUPhwprogress "${thisLIST[@]}" - ^-- SC2154: thisLIST is referenced but not assigned. +In mkp line 231: + export sectors=$(($sectors)) + ^-- SC2004: $/${} is unnecessary on arithmetic variables. -In /home/dahl/bzr/one-button-installer/OBI/hw-progress line 154: -[[ -f "$hwLOGGe" ]] && LOGGERecho $(cat "$hwLOGGe") - ^-- SC2046: Quote this to prevent word splitting. +In mkp line 232: + export sectsize=$(($sectsize)) + ^-- SC2004: $/${} is unnecessary on arithmetic variables. +In mkp line 234: + export diskms=$(($diskms)) + ^-- SC2004: $/${} is unnecessary on arithmetic variables. -In /home/dahl/bzr/one-button-installer/OBI/ldeb line 1: -ls $* live_boot*/*.iso|tr -s ' ' ' '| cut -d ' ' -f 5- -^-- SC2148: Tips depend on target shell and yours is unknown. Add a shebang. -^-- SC2012: Use find instead of ls to better handle non-alphanumeric filenames. - ^-- SC2048: Use "$@" (with quotes) to prevent whitespace problems. - ^-- SC2086: Double quote to prevent globbing and word splitting. +In mkp line 242: + elif (( $sectors < $diskms )) + ^-- SC2004: $/${} is unnecessary on arithmetic variables. + ^-- SC2004: $/${} is unnecessary on arithmetic variables. -In /home/dahl/bzr/one-button-installer/OBI/limg line 1: -ls $* live_boot*/image/live/*.img.*|tr -s ' ' ' '| cut -d ' ' -f 5- -^-- SC2148: Tips depend on target shell and yours is unknown. Add a shebang. -^-- SC2012: Use find instead of ls to better handle non-alphanumeric filenames. - ^-- SC2048: Use "$@" (with quotes) to prevent whitespace problems. - ^-- SC2086: Double quote to prevent globbing and word splitting. -In /home/dahl/bzr/one-button-installer/OBI/list_drives line 40: -ls -l /dev/disk/by-id| grep "[a-z]$"|tr -s ' ' ' '|cut -d ' ' -f 9,11 \ -^-- SC2010: Don't use ls | grep. Use a glob or a for loop with a condition to allow non-alphanumeric filenames. +In mkp line 254: + swapsize="$(getSwapSize $Device)" + ^-- SC2086: Double quote to prevent globbing and word splitting. -In /home/dahl/bzr/one-button-installer/OBI/list_drives line 41: -|sort -k2|grep -e \^a -e \^u|sed 's#../..#/dev#' > "$tmpfil" - ^-- SC1001: This \^ will be a regular '^' in this context. - ^-- SC1001: This \^ will be a regular '^' in this context. +In mkp line 255: + swapsize=$(( $swapsize )) + ^-- SC2004: $/${} is unnecessary on arithmetic variables. -In /home/dahl/bzr/one-button-installer/OBI/list_drives line 52: -while read device dum1 dum2 bytesize - ^-- SC2034: dum1 appears unused. Verify it or export it. - ^-- SC2034: dum2 appears unused. Verify it or export it. +In mkp line 422: + RELEASE=$(chrootCommand "${thisCHROOT}" "mkp" "lsb_release -a | grep Codename:| sed 's/.*\t//'") + ^-- SC2034: RELEASE appears unused. Verify it or export it. -In /home/dahl/bzr/one-button-installer/OBI/memer line 7: -sum=$(($parts)) - ^-- SC2004: $/${} is unnecessary on arithmetic variables. +In mkp line 460: + grubconf="$( < ${thisCHROOT}/boot/grub/grub.cfg)" + ^-- SC2086: Double quote to prevent globbing and word splitting. -In /home/dahl/bzr/one-button-installer/OBI/memer line 8: -sum=$(($sum *1024)) - ^-- SC2004: $/${} is unnecessary on arithmetic variables. +In mkp line 566: + homepart="$8" + ^-- SC2034: homepart appears unused. Verify it or export it. -In /home/dahl/bzr/one-button-installer/OBI/memer line 9: -if (( $sum == 0 )) - ^-- SC2004: $/${} is unnecessary on arithmetic variables. -In /home/dahl/bzr/one-button-installer/OBI/menumethod-lister line 14: - TOTAL=$(( $TOTAL + 1 )) - ^-- SC2004: $/${} is unnecessary on arithmetic variables. +In mkp line 574: + sectors="$(getSectors $device)" + ^-- SC2086: Double quote to prevent globbing and word splitting. -In /home/dahl/bzr/one-button-installer/OBI/menumethod-lister line 18: -INC=$(( 100 / $TOTAL )) - ^-- SC2004: $/${} is unnecessary on arithmetic variables. +In mkp line 575: + swapsize="$(getSwapSize $device)" + ^-- SC2086: Double quote to prevent globbing and word splitting. -In /home/dahl/bzr/one-button-installer/OBI/menumethod-lister line 25: -j=$(( $INC + $j )) - ^-- SC2004: $/${} is unnecessary on arithmetic variables. - ^-- SC2004: $/${} is unnecessary on arithmetic variables. +In mkp line 576: + sectsize="$(getSectorSize $device)" + ^-- SC2086: Double quote to prevent globbing and word splitting. -In /home/dahl/bzr/one-button-installer/OBI/mkctrl line 32: - partitions="partitions" - ^-- SC2034: partitions appears unused. Verify it or export it. +In mkp1 line 57: + sectsize="$(getSectorSize $device)" + ^-- SC2086: Double quote to prevent globbing and word splitting. -In /home/dahl/bzr/one-button-installer/OBI/mkctrl line 81: - wdir="${PWD}"/ - ^-- SC2034: wdir appears unused. Verify it or export it. +In mkp2p1 line 48: + sectors="$(getSectors $device)" + ^-- SC2086: Double quote to prevent globbing and word splitting. -In /home/dahl/bzr/one-button-installer/OBI/mkctrl line 123: - advanced=true - ^-- SC2034: advanced appears unused. Verify it or export it. +In mkp2p1 line 49: + swapsize="$(getSwapSize $device)" + ^-- SC2086: Double quote to prevent globbing and word splitting. -In /home/dahl/bzr/one-button-installer/OBI/mkhome line 5: -homepartitionisnotspecified=$(eval_gettext "Home partition is not specified, as obi-home") -^-- SC2034: homepartitionisnotspecified appears unused. Verify it or export it. +In mkp2p1 line 50: + sectsize="$(getSectorSize $device)" + ^-- SC2086: Double quote to prevent globbing and word splitting. -In /home/dahl/bzr/one-button-installer/OBI/mkhome line 10: -ZEN_ICON="--window-icon=$ICONPATH" -^-- SC2034: ZEN_ICON appears unused. Verify it or export it. +In mktbl line 96: +echo -e "sudo $0 $tomakeatarballofthefiles\n$Partitiontobeused $source\n$Youmayneedtoremoveexistingtarballs\n\n$Thesemaincommandsareprepared\nmount $prtn /mnt\ncd /mnt\ntar -cv${compr}f ${trgt}.tar.$ext ." + ^-- SC2154: prtn is referenced but not assigned. + ^-- SC2154: trgt is referenced but not assigned. -In /home/dahl/bzr/one-button-installer/OBI/mkhome line 11: -tailfile="${HOME}"/.obi-progress -^-- SC2034: tailfile appears unused. Verify it or export it. +In mktbl line 107: + echo "$Thereshouldbeenoughspaceforthenewtarball" + ^-- SC2154: Thereshouldbeenoughspaceforthenewtarball is referenced but not assigned. -In /home/dahl/bzr/one-button-installer/OBI/mkhome line 36: -done < "$partitions" - ^-- SC2154: partitions is referenced but not assigned. +In obi-functions line 104: + [[ -f "$HOME/usezenity" ]] && USEZENITY="$( < $HOME/usezenity)" + ^-- SC2086: Double quote to prevent globbing and word splitting. -In /home/dahl/bzr/one-button-installer/OBI/mkhome line 66: - LOGecho "HOME fstab:
$(cat ${CHROOT}/etc/fstab)
" - ^-- SC2086: Double quote to prevent globbing and word splitting. -In /home/dahl/bzr/one-button-installer/OBI/mkp line 30: -CPUarchFile="$HOME/distro.cpu" -^-- SC2034: CPUarchFile appears unused. Verify it or export it. +In obi-functions line 114: + [[ -z "$obi_system" ]] && [[ -f "$HOME/OSname" ]] && obi_system="$( < $HOME/OSname)" && export obi_system + ^-- SC2086: Double quote to prevent globbing and word splitting. -In /home/dahl/bzr/one-button-installer/OBI/mkp line 186: - export sectors=$(($sectors)) - ^-- SC2004: $/${} is unnecessary on arithmetic variables. +In obi-functions line 269: + echo "ls -l /dev/disk/by-id| grep [a-z]$|tr -s ' ' ' ' \\" >> "$hlptxt" + ^-- SC2129: Consider using { cmd1; cmd2; } >> file instead of individual redirects. -In /home/dahl/bzr/one-button-installer/OBI/mkp line 187: - export sectsize=$(($sectsize)) - ^-- SC2004: $/${} is unnecessary on arithmetic variables. +In obi-functions line 273: + ls -l /dev/disk/by-id| grep "[a-z]$"|tr -s ' ' ' ' \ + ^-- SC2010: Don't use ls | grep. Use a glob or a for loop with a condition to allow non-alphanumeric filenames. -In /home/dahl/bzr/one-button-installer/OBI/mkp line 188: - export diskms=$(($diskmin*1000*1000*1000/$sectsize)) - ^-- SC2004: $/${} is unnecessary on arithmetic variables. - ^-- SC2004: $/${} is unnecessary on arithmetic variables. +In obi-functions line 274: + |cut -d ' ' -f 9,11|sort -k2|grep -e \^a -e \^u \ + ^-- SC1001: This \^ will be a regular '^' in this context. + ^-- SC1001: This \^ will be a regular '^' in this context. +In obi-functions line 326: + MSG="$( < $hlptxt)" + ^-- SC2086: Double quote to prevent globbing and word splitting. -In /home/dahl/bzr/one-button-installer/OBI/mktbl line 96: -echo -e "sudo $0 $tomakeatarballofthefiles -$Partitiontobeused $source -$Youmayneedtoremoveexistingtarballs +In obi-functions line 380: + pvplug=false ## what is this for?? + ^-- SC2034: pvplug appears unused. Verify it or export it. -$Thesemaincommandsareprepared -mount $prtn /mnt -cd /mnt -tar -cv${compr}f ${trgt}.tar.$ext ." - ^-- SC2154: prtn is referenced but not assigned. - ^-- SC2154: trgt is referenced but not assigned. +In obi-functions line 532: + [[ -f "$TARBALLfile" ]] && TARBALLfile="$( < $TARBALLfile)" + ^-- SC2086: Double quote to prevent globbing and word splitting. -In /home/dahl/bzr/one-button-installer/OBI/mktbl line 107: - echo "$Thereshouldbeenoughspaceforthenewtarball" - ^-- SC2154: Thereshouldbeenoughspaceforthenewtarball is referenced but not assigned. -In /home/dahl/bzr/one-button-installer/OBI/obi line 61: -curdir="$dpath" -^-- SC2034: curdir appears unused. Verify it or export it. +In obi-functions line 635: + ufl=usb ## what is this for?? + ^-- SC2034: ufl appears unused. Verify it or export it. -In /home/dahl/bzr/one-button-installer/OBI/obi line 92: -dialogMESSAGE="$SelectedTarball: $tarball" - ^-- SC2154: tarball is referenced but not assigned. +In obi-functions line 640: + MSG=" \Z1$WARNING $Unmountthetargetdeviceifmounted\Zn\n\n$tmpstr\n$usbstr" + ^-- SC2154: usbstr is referenced but not assigned. -In /home/dahl/bzr/one-button-installer/OBI/obi line 94: -if $advanced - ^-- SC2154: advanced is referenced but not assigned. +In obi-functions line 645: +='color:$WARN_COLOR;'>}" + ^-- SC2016: Expressions don't expand in single quotes, use double quotes for that. -In /home/dahl/bzr/one-button-installer/OBI/partition-help line 77: - ram=$(($ram)) - ^-- SC2004: $/${} is unnecessary on arithmetic variables. -In /home/dahl/bzr/one-button-installer/OBI/position_win line 23: -wxh=$(xrandr|grep '*'|sed -e 's/^ *//' -e 's/ .*//') - ^-- SC2063: Grep uses regex, but this looks like a glob. +In obi-functions line 647: + MSG=" + ^-- SC2089: Quotes/backslashes will be treated literally. Use an array. -In /home/dahl/bzr/one-button-installer/OBI/position_win line 26: -zleft=$(( ($swide - $win_width)/2 )) - ^-- SC2004: $/${} is unnecessary on arithmetic variables. - ^-- SC2004: $/${} is unnecessary on arithmetic variables. +In obi-functions line 654: + MSG="$(convertDialogtoHTML ${MSG})" + ^-- SC2090: Quotes/backslashes in this variable will not be respected. + ^-- SC2086: Double quote to prevent globbing and word splitting. -In /home/dahl/bzr/one-button-installer/OBI/position_win line 37: -buffer=$(( $titlebarheight + $panelheight)) - ^-- SC2004: $/${} is unnecessary on arithmetic variables. - ^-- SC2004: $/${} is unnecessary on arithmetic variables. +In obi-functions line 690: + for unmountDEV in $(grep "$DEVICE" /etc/mtab|sed s#\ /.*##) + ^-- SC2013: To read lines rather than words, pipe/redirect to a 'while read' loop. -In /home/dahl/bzr/one-button-installer/OBI/position_win line 39: -ztop=$(( $shigh - ($multi * ($win_height+$buffer)) )) - ^-- SC2004: $/${} is unnecessary on arithmetic variables. - ^-- SC2004: $/${} is unnecessary on arithmetic variables. - ^-- SC2004: $/${} is unnecessary on arithmetic variables. - ^-- SC2004: $/${} is unnecessary on arithmetic variables. +In obi-functions line 767: + bind=$(($bind + 1)) + ^-- SC2004: $/${} is unnecessary on arithmetic variables. -In /home/dahl/bzr/one-button-installer/OBI/select-device line 11: -OneButtonInstaller=$(eval_gettext "One Button Installer") -^-- SC2034: OneButtonInstaller appears unused. Verify it or export it. +In obi-functions line 769: + bind=$(($bind + 1)) + ^-- SC2004: $/${} is unnecessary on arithmetic variables. -In /home/dahl/bzr/one-button-installer/OBI/select-device line 32: -mkctrl "$obi_system" "$tarball" - ^-- SC2154: tarball is referenced but not assigned. +In obi-functions line 844: + if [[ "$source" == "/dev/zero" ]] + ^-- SC2154: source is referenced but not assigned. -In /home/dahl/bzr/one-button-installer/OBI/select-device line 36: -choice=1 -^-- SC2034: choice appears unused. Verify it or export it. +In obi-functions line 929: + if (( $ans != 0 )) + ^-- SC2004: $/${} is unnecessary on arithmetic variables. -In /home/dahl/bzr/one-button-installer/OBI/select-device line 41: -source="$1" -^-- SC2034: source appears unused. Verify it or export it. +In obi-functions line 1070: + ch_item="$ans" + ^-- SC2034: ch_item appears unused. Verify it or export it. -In /home/dahl/bzr/one-button-installer/OBI/select-device line 44: -tmpstr="" -^-- SC2034: tmpstr appears unused. Verify it or export it. +In obi-functions line 1165: + (( $retval == 0 )) && return 0 + ^-- SC2004: $/${} is unnecessary on arithmetic variables. + +In partition-help line 77: + ram=$(($ram)) + ^-- SC2004: $/${} is unnecessary on arithmetic variables. -In /home/dahl/bzr/one-button-installer/OBI/select-device line 72: - ans=$(dialog --backtitle "$version - $Selectdevice" \ - ^-- SC2034: ans appears unused. Verify it or export it. -In /home/dahl/bzr/one-button-installer/OBI/select-part1 line 25: -noextraparameters=$(eval_gettext "No extra parameters") -^-- SC2034: noextraparameters appears unused. Verify it or export it. +In position_win line 36: + wxh=$(xrandr 2>/dev/null|grep '*'|sed -e 's/^ *//' -e 's/ .*//' ) + ^-- SC2063: Grep uses regex, but this looks like a glob. -In /home/dahl/bzr/one-button-installer/OBI/select-part1 line 58: - echoout "$Usage -$Install $obi_system -$installTARGET ----- $Install $system -------- -sudo $0" - ^-- SC2154: system is referenced but not assigned. +In position_win line 39: + zleft=$(( ($swide - $win_width)/2 )) + ^-- SC2004: $/${} is unnecessary on arithmetic variables. + ^-- SC2004: $/${} is unnecessary on arithmetic variables. -In /home/dahl/bzr/one-button-installer/OBI/select-part2 line 19: -SelectOBIlevel=$(eval_gettext "Select OBI level") -^-- SC2034: SelectOBIlevel appears unused. Verify it or export it. +In position_win line 40: + if (( $zleft < 0 )) + ^-- SC2004: $/${} is unnecessary on arithmetic variables. -In /home/dahl/bzr/one-button-installer/OBI/select-part2 line 26: -TYPE=$(eval_gettext "TYPE") -^-- SC2034: TYPE appears unused. Verify it or export it. +In position_win line 51: + buffer=$(( $titlebarheight + $panelheight)) + ^-- SC2004: $/${} is unnecessary on arithmetic variables. + ^-- SC2004: $/${} is unnecessary on arithmetic variables. -In /home/dahl/bzr/one-button-installer/OBI/select-part2 line 70: -item=0 -^-- SC2034: item appears unused. Verify it or export it. +In position_win line 53: + ztop=$(( $shigh - ($multi * ($win_height+$buffer)) )) + ^-- SC2004: $/${} is unnecessary on arithmetic variables. + ^-- SC2004: $/${} is unnecessary on arithmetic variables. + ^-- SC2004: $/${} is unnecessary on arithmetic variables. + ^-- SC2004: $/${} is unnecessary on arithmetic variables. -In /home/dahl/bzr/one-button-installer/OBI/select-part2 line 71: -seltxt= -^-- SC2034: seltxt appears unused. Verify it or export it. + +In position_win line 54: + if (( $ztop < 0 )) + ^-- SC2004: $/${} is unnecessary on arithmetic variables. -In /home/dahl/bzr/one-button-installer/OBI/select-part2 line 124: -memtxt= -^-- SC2034: memtxt appears unused. Verify it or export it. +In select-device line 51: +choice=1 +^-- SC2034: choice appears unused. Verify it or export it. -In /home/dahl/bzr/one-button-installer/OBI/select-part2 line 147: -while read headvar[jj] - ^-- SC2102: Ranges can only match single chars (mentioned due to duplicates). +In select-device line 56: +source="$1" +^-- SC2034: source appears unused. Verify it or export it. -In /home/dahl/bzr/one-button-installer/OBI/select-part2 line 203: -while read listvar[jj] listvar[jj+1] dummy listvar[jj+2] listvar[jj+3] listvar[jj+4] - ^-- SC2102: Ranges can only match single chars (mentioned due to duplicates). - ^-- SC2102: Ranges can only match single chars (mentioned due to duplicates). - ^-- SC2102: Ranges can only match single chars (mentioned due to duplicates). - ^-- SC2102: Ranges can only match single chars (mentioned due to duplicates). - ^-- SC2102: Ranges can only match single chars (mentioned due to duplicates). +In select-device line 118: +[[ "$tarball" == "${tarball/noswap}" ]] && [[ -n "${tarball}" ]] && useSWAPPER="FALSE" + ^-- SC2034: useSWAPPER appears unused. Verify it or export it. -In /home/dahl/bzr/one-button-installer/OBI/select-part2 line 263: +In select-part2 line 76: +item=0 +^-- SC2034: item appears unused. Verify it or export it. + + +In select-part2 line 132: + while read headvar[jj] + ^-- SC2102: Ranges can only match single chars (mentioned due to duplicates). + + +In select-part2 line 189: + while read listvar[jj] listvar[jj+1] dummy listvar[jj+2] listvar[jj+3] listvar[jj+4] + ^-- SC2102: Ranges can only match single chars (mentioned due to duplicates). + ^-- SC2102: Ranges can only match single chars (mentioned due to duplicates). + ^-- SC2102: Ranges can only match single chars (mentioned due to duplicates). + ^-- SC2102: Ranges can only match single chars (mentioned due to duplicates). + ^-- SC2102: Ranges can only match single chars (mentioned due to duplicates). + + +In select-part2 line 250: ${listvar[@]} 2> /dev/null) ^-- SC2068: Double quote array expansions, otherwise they're like $* and break on spaces. -In /home/dahl/bzr/one-button-installer/OBI/select-part2 line 270: +In select-part2 line 257: --default-item "$choice" --colors --ok-label "$partitionCHOICE $targ" --cancel-label "$Quit" \ ^-- SC2154: choice is referenced but not assigned. -In /home/dahl/bzr/one-button-installer/OBI/select-tarball line 81: -tarstr="${tarpath}"/*.tar.[gx]z ## this is for a for loop - ^-- SC2125: Brace expansions and globs are literal in assignments. Quote it or use an array. +In select-part2 line 374: +LOG_ECHO "$( < $partitions)" + ^-- SC2086: Double quote to prevent globbing and word splitting. -In /home/dahl/bzr/one-button-installer/OBI/select-tarball line 156: -cnt= ## what is this for?? -^-- SC2034: cnt appears unused. Verify it or export it. - ^-- SC1007: Remove space after = if trying to assign a value (for empty string, use var='' ... ). +In select-tarball line 69: + tarstr="${tarpath}"/*.tar.[gx]z ## this is for a for loop + ^-- SC2125: Brace expansions and globs are literal in assignments. Quote it or use an array. -In /home/dahl/bzr/one-button-installer/OBI/select-tarball line 244: -cmdsav= #what is this for??? -^-- SC2034: cmdsav appears unused. Verify it or export it. - ^-- SC1007: Remove space after = if trying to assign a value (for empty string, use var='' ... ). +In starter line 150: +SVGSPLASH="$( < $ICON_DIR//hicolor/scalable/apps/obi-splash-screen.svg)" + ^-- SC2086: Double quote to prevent globbing and word splitting. -In /home/dahl/bzr/one-button-installer/OBI/systar line 1: +In systar line 1: grep ^system mkctrl|grep -v '$1' ^-- SC2148: Tips depend on target shell and yours is unknown. Add a shebang. ^-- SC2016: Expressions don't expand in single quotes, use double quotes for that. -In /home/dahl/bzr/one-button-installer/OBI/systar line 2: +In systar line 2: grep ^tarball mkctrl|grep -v '$2' ^-- SC2016: Expressions don't expand in single quotes, use double quotes for that. -In /home/dahl/bzr/one-button-installer/OBI/systar line 3: +In systar line 3: grep ^#system mkctrl|grep -v '$1' ^-- SC2016: Expressions don't expand in single quotes, use double quotes for that. -In /home/dahl/bzr/one-button-installer/OBI/systar line 4: +In systar line 4: grep ^#tarball mkctrl|grep -v '$2' ^-- SC2016: Expressions don't expand in single quotes, use double quotes for that. -In /home/dahl/bzr/one-button-installer/OBI/truncate-log line 6: -find $1/var/log -type f -exec echo "> {}" \;>doer - ^-- SC2086: Double quote to prevent globbing and word splitting. +In user-config line 219: + if (( $retval != 0 )) + ^-- SC2004: $/${} is unnecessary on arithmetic variables. -In /home/dahl/bzr/one-button-installer/OBI/truncate-log line 9: -du $1/var/log - ^-- SC2086: Double quote to prevent globbing and word splitting. +In user-config line 274: + Uname=($(echo ${Uname[*]} | awk -F':' '{print $1}')) + ^-- SC2086: Double quote to prevent globbing and word splitting. -In /home/dahl/bzr/one-button-installer/OBI/user-config line 54: -Information=$(eval_gettext "Information") -^-- SC2034: Information appears unused. Verify it or export it. +In zmktbl line 141: + while [[ "$ans" != "$ans_q" ]] && [[ "$ans" != "x" ]] || [[ "$prtn" == "not_selected" ]] + ^-- SC2015: Note that A && B || C is not if-then-else. C may run when A is true. -In /home/dahl/bzr/one-button-installer/OBI/user-config line 56: -machine64bitinstalling32bitOS=$(eval_gettext "64bit machine installing 32 bit OS") -^-- SC2034: machine64bitinstalling32bitOS appears unused. Verify it or export it. +In zmktbl line 258: + (tar -cf - . | pv -n -s $(du -sb . | awk '{print $1}') | ${compr} > "$thisTARBALL") 2>&1| zenity --class="$ProgramName" --progress --title="$ProgramName" --width="$width" --height="$height" --text="Compressing $thisDIR" --auto-close --no-cancel + ^-- SC2046: Quote this to prevent word splitting. + ^-- SC2154: ProgramName is referenced but not assigned. -In /home/dahl/bzr/one-button-installer/OBI/user-config line 70: -tzselectisnotinstalledonyoursystem=$(eval_gettext "tzselect is not installed on your system") -^-- SC2034: tzselectisnotinstalledonyoursystem appears unused. Verify it or export it. +In zmktbl line 263: + (tar -cf - . | pv -n -s $(du -sb . | awk '{print $1}') | ${compr} > "$thisTARBALL") 2>&1 | dialog --gauge 'Progress' 7 70 + ^-- SC2046: Quote this to prevent word splitting. -In /home/dahl/bzr/one-button-installer/OBI/user-config line 181: - Uname=($(echo ${Uname[*]} | awk -F':' '{print $1}')) - ^-- SC2086: Double quote to prevent globbing and word splitting. -In /home/dahl/bzr/one-button-installer/OBI/zmktbl line 142: -while [ "$ans" != "$ans_q" ] && [ "$ans" != "x" ] || [ "$prtn" == "not_selected" ] - ^-- SC2015: Note that A && B || C is not if-then-else. C may run when A is true. +In zmktbl line 266: + tar -cf - . | pv -n -s $(du -sb . | awk '{print $1}') | ${compr} > "$thisTARBALL" + ^-- SC2046: Quote this to prevent word splitting. + +In zmktbl line 327: + declare -a obls=( $(ls -1 "${tarpath}"/*.tar.[gx]z|sed -e "s/\ /.'./"g -e 's/^/FALSE /') ) + ^-- SC2012: Use find instead of ls to better handle non-alphanumeric filenames. -In /home/dahl/bzr/one-button-installer/OBI/zmktbl line 308: -declare -a obls=( $(ls -1 "${tarpath}"/*.tar.[gx]z|sed -e "s/\ /.'./"g -e 's/^/FALSE /') ) - ^-- SC2012: Use find instead of ls to better handle non-alphanumeric filenames. +In zmktbl-wrapper line 10: +[[ -z "$SUDO_ASKPASS" ]] && [[ -n "$(which torios-askpass)" ]] && export SUDO_ASKPASS="$(which torios-askpass)" + ^-- SC2155: Declare and assign separately to avoid masking return values. + + +In zoned-out line 41: +[[ -f "$HOME/usezenity" ]] && USEZENITY="$( < $HOME/usezenity)" + ^-- SC2086: Double quote to prevent globbing and word splitting. -In /home/dahl/bzr/one-button-installer/OBI/zmktbl line 319: -${obls[@]} 2> /dev/null 2> /dev/null ) -^-- SC2068: Double quote array expansions, otherwise they're like $* and break on spaces. +In zoned-out line 57: + TIME=$(readlink -f "$i") + ^-- SC2034: TIME appears unused. Verify it or export it. -In /home/dahl/bzr/one-button-installer/OBI/zmktbl line 324: - rm ${ans//.\'./ } - ^-- SC2086: Double quote to prevent globbing and word splitting. diff -Nru obi-installer-3.3.0ubuntu0/OBI/truncate-log obi-installer-3.4.0ubuntu0/OBI/truncate-log --- obi-installer-3.3.0ubuntu0/OBI/truncate-log 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/truncate-log 2018-03-15 13:13:10.000000000 +0000 @@ -1,9 +1,9 @@ #!/bin/bash -echo run via sudo -s +echo "run via sudo -s" sleep 2 -find $1/var/log -type f -exec echo "> {}" \;>doer +find "$1"/var/log -type f -exec echo "> {}" \;>doer bash doer rm doer -du $1/var/log +du "$1"/var/log diff -Nru obi-installer-3.3.0ubuntu0/OBI/user-config obi-installer-3.4.0ubuntu0/OBI/user-config --- obi-installer-3.3.0ubuntu0/OBI/user-config 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/user-config 2018-03-15 13:13:10.000000000 +0000 @@ -12,7 +12,10 @@ # MIT License # # # ############################################################## -. gettext.sh +eval_gettext(){ + echo -e "$*" +} +source gettext.sh export TEXTDOMAIN=obi-installer ########################################################### NOT_MY_BUG=$(eval_gettext "Please Contact the Distro maintainer") @@ -21,7 +24,7 @@ Removing=$(eval_gettext "Removing") Enteryournewusersname=$(eval_gettext "Enter your new user's name") Added=$(eval_gettext "Added") -OneButtonInstallerCreatePassword=$(eval_gettext "One Button Installer - Create Password") +OneButtonInstallerCreatePassword=$(eval_gettext "Create Password") Createpassword=$(eval_gettext "Create password") Submit=$(eval_gettext "Submit") ## Arrod DOWN and TAB are keyboard keys @@ -51,9 +54,8 @@ CPUhasnoPAEflag=$(eval_gettext "CPU has no PAE flag") ## 64bit is a type of processor architecture processor64bit=$(eval_gettext "64bit processor") -Information=$(eval_gettext "Information") Youmightwanttoconsiderusinga64bitoperatingsystem=$(eval_gettext "You might want to consider using a 64bit operating system") -machine64bitinstalling32bitOS=$(eval_gettext "64bit machine installing 32 bit OS") +#machine64bitinstalling32bitOS=$(eval_gettext "64bit machine installing 32 bit OS") CPUisnot64bit=$(eval_gettext "CPU is not 64bit") ## xdg-dirs and gtk-dirs are programs... leave the names as is please updatedmenusandxdgdirsandgtkdirs=$(eval_gettext "updated menus, and xdg-dirs and gtk-dirs") @@ -80,55 +82,72 @@ updating=$(eval_gettext "Updating:") OneButtonInstaller=$(eval_gettext "One Button Installer") INSTALLINGpaeKernel=$(eval_gettext "Installing PAE Kernel") -ScriptnotfoundChangedirectory=$(eval_gettext "Script not found. Change directory") NOpaeSixtyFourBit=$(eval_gettext "64bit OS doesn't require PAE installation") UPDATINGpackages=$(eval_gettext "Updating the System") UPDATEpackages=$(eval_gettext "Check for post-release Updates to the System?") THISMAYTAKETIME=$(eval_gettext "Please Note, this operation could take a long time depending on your internet connection, and hardware.") ########################################################### +################################################ +## Source our handy functions!! +## make sure they are in the PATH first +OBI_SHARE_DIR="/usr/share/OBI" +if [[ -d "${OBI_SHARE_DIR}" ]] && [[ "${PATH/$OBI_SHARE_DIR}" == "${PATH}" ]] +then + PATH="${PATH}:/usr/share/OBI" + export PATH +elif [[ "${PATH/$PWD}" == "${PATH}" ]] +then + PATH="${PATH}:${PWD}" + export PATH +fi +source obi-functions || exit +################################################ [[ -n "$1" ]] && CHROOT="$1" -[[ -z "${CHROOT}" ]] && CHROOT="/mnt" +CHROOT=$(chrootDirectory "${CHROOT}") +# logging functions ## +ECHO(){ + echoOut "user-config" "$*" +} +LOG_ECHO(){ + echoLOG "user-config" "$*" +} +LOG_ECHO "chroot directory: $CHROOT" + # uh... what distro is installed? -DISTRO=$(chroot "${CHROOT}" bash -c "uname -a") +DISTRO=$(chrootCommand "$CHROOT" "user-config" "uname -a") + # customize the user's groups here if [[ "${DISTRO/Ubuntu}" != "${DISTRO}" ]] then # Using Ubuntu - MY_GROUPS="audio,cdrom,plugdev,users,adm,sudo,netdev,lpadmin" + MY_GROUPS="audio,cdrom,plugdev,users,adm,sudo,netdev,lpadmin" elif [[ "${DISTRO/Debian}" != "${DISTRO}" ]] then # using Debian MY_GROUPS="audio,cdrom,plugdev,users,adm,video,dip,floppy,sudo,netdev" else - # no idea what this is, lets just be safe and add to sudo and users.. they can fix it, yeah? + # no idea what distro this is, lets just be safe and add to sudo and users.. they can fix it, yeah? MY_GROUPS="users,sudo" fi -[[ -f "$HOME/usezenity" ]] && USEZENITY=$( < "$HOME/usezenity") -ICONPATH="/usr/share/icons/hicolor/48x48/apps/obi-window-icon.png" +[[ -z "$USEZENITY" ]] && USEZENITY="$(getZenity)" +ICONPATH="$(getIcon)" ZEN_ICON="--window-icon=$ICONPATH" -# logging functions ## -echoout() { - if [[ "$USEZENITY" == "true" ]] - then - zenity --class=OBI --info --timeout=7 --title="$OneButtonInstaller" "$ZEN_ICON" --text="$*" - echo -e "
[user-config]
$*" >> "${HOME}"/obi-installer.log - else - dialog --infobox "$*" 0 0 - sleep .7 - echo -e "[user-config] $*" >> "${HOME}"/obi-installer.log - fi -} + + +## give indication that there is no Internet noInet(){ - echout "No internet" + ECHO "No internet" return 1 } + +## check for a working connection to the Internet checkInternet(){ retval=0 if [[ -n $(which nmcli) ]] then - [[ $(nmcli -f STATE -t g) != connected ]] && noInet + [[ $(nmcli -f STATE -t g) != connected ]] && retval=$(noInet) else EIGHT=$(ping -c 1 8.8.8.8 | grep '100% packet loss') if (( $? != 0 )) @@ -147,37 +166,11 @@ fi [[ -n $GNUping ]] && retval=$(noInet) fi - return $retval -} -LOGecho(){ - if [[ "$USEZENITY" == "true" ]] - then - echo -e "
[user-config]
$*" >> "${HOME}"/obi-installer.log - else - echo -e "[user-config] $*" >> "${HOME}"/obi-installer.log - fi -} -getpath() { - if [[ -f "/home/$USER/obi" ]] - then - dpath="/home/$USER" - elif [[ -f "$PWD/obi" ]] - then - dpath="$PWD" - elif [[ -f "${HOME}/obi" ]] - then - dpath="${HOME}" - elif [[ -f "/usr/share/OBI/obi" ]] - then - dpath="/usr/share/OBI" - else - echoout "$ScriptnotfoundChangedirectory" - exit 1 - fi - echo "$dpath" + return "$retval" } -dpath=$(getpath) +## initialize the dpath variable +dpath=$(getDpath) ## This function was causing issues by running dbus things in the CHROOT. menuUpdater(){ @@ -185,18 +178,19 @@ then width=330 height=80 - cp "$dpath"/menumethod-lister "${CHROOT}"/usr/bin && chmod +x "${CHROOT}"/usr/bin/menumethod-lister && LOGecho "copied menumethod-lister" - chroot "${CHROOT}" bash -c "export HOME=\"/home/$NEWUSER\" && export USER=\"$NEWUSER\" && sudo -u \"$NEWUSER\" ${XDG_U_DIRS} && menumethod-lister"| zenity --class=OBI --progress "${ZEN_ICON}" --title="$updating menus" --text="$updating menus" --width=270 --height=80 --auto-close --no-cancel + cp "$dpath"/menumethod-lister "${CHROOT}"/usr/bin && chmod +x "${CHROOT}"/usr/bin/menumethod-lister && LOG_ECHO "copied menumethod-lister" + chrootCommand "$CHROOT" "user-config" "export HOME=/home/$NEWUSER && export USER=$NEWUSER && sudo -u $NEWUSER ${XDG_U_DIRS} && menumethod-lister"| zenity --class=OBI --progress "${ZEN_ICON}" --title="$updating menus" --text="$updating menus" --width=270 --height=80 --auto-close --no-cancel 2>/dev/null pid="$(pgrep -n zenity)" - dpath=$(getpath) + dpath=$(getDpath) "$dpath"/position_win "$pid" "$width" "$height" "2" - rm "${CHROOT}"/usr/bin/menumethod-lister && LOGecho "removed menumethod-lister" + rm "${CHROOT}"/usr/bin/menumethod-lister && LOG_ECHO "removed menumethod-lister" else - chroot "${CHROOT}" bash -c "export HOME=\"/home/$NEWUSER\" && export USER=\"$NEWUSER\" && sudo -u \"$NEWUSER\" ${XDG_U_DIRS} && update-menus" && LOGecho "[$WARNING] $updatedmenusandxdgdirsbutnotgtkdirsxdguserdirsgtkupdateisnotinstalled + chrootCommand "$CHROOT" "user-config" "export HOME=/home/$NEWUSER && export USER=$NEWUSER && sudo -u $NEWUSER ${XDG_U_DIRS} && update-menus" && LOG_ECHO "[$WARNING] $updatedmenusandxdgdirsbutnotgtkdirsxdguserdirsgtkupdateisnotinstalled $NOT_MY_BUG" fi } +## this reads the lines and will add them together... basically a quick check method instead of needing to manually do this all the time make_lines(){ LINE="$1" rest="$2" @@ -205,57 +199,87 @@ echo "${LINE}" return fi - echo -e "${rest}\n${LINE}" + echo "${rest} +${LINE}" } +## setup LightDM autologin for the user lightdm_setup(){ USERNAME="$1" thisCHROOT="$2" if [[ -z "$USERNAME" ]] || [[ -z "$thisCHROOT" ]] then - LOGecho "$Noautologinfor: $USERNAME." + LOG_ECHO "$Noautologinfor: $USERNAME." return 1 fi #LightDM exists... ask if they want autologin if [[ "$USEZENITY" == "true" ]] then - zenity --class=OBI --question "${ZEN_ICON}" --title="$AutoLogin" --text="$Doyouwanttologyouruserinautomatically" + zenity --class=OBI --question "${ZEN_ICON}" --title="$AutoLogin" --text="$Doyouwanttologyouruserinautomatically" 2>/dev/null + retval="$?" else dialog --title "$AutoLogin" --clear --yesno "$Doyouwanttologyouruserinautomatically" 10 30 + retval="$?" fi - case $? in - 0) - DEFAULT_FILE="[Seat:*]\ngreeter-session=lightdm-gtk-greeter\nautologin-user=${USERNAME}" - if [[ ! -f "${thisCHROOT}/etc/lightdm/lightdm.conf" ]] - then - echo -e "${DEFAULT_FILE}" | sudo tee "${thisCHROOT}/etc/lightdm/lightdm.conf" - LOGecho "$Autologinfor: $USERNAME." - return - fi - unset OUTPUT SETAUTO - while read LINE || [[ -n "$LINE" ]] - do + if (( $retval != 0 )) + then + LOG_ECHO "$Noautologinfor: $USERNAME." + return 0 + else + DEFAULT_FILE="[Seat:*] +greeter-session=lightdm-gtk-greeter +autologin-user=${USERNAME}" + if [[ ! -f "${thisCHROOT}/etc/lightdm/lightdm.conf" ]] + then + echo -e "${DEFAULT_FILE}" | sudo tee "${thisCHROOT}/etc/lightdm/lightdm.conf" + clear + LOG_ECHO "$Autologinfor: $USERNAME." + return 0 + fi + unset OUTPUT SETAUTO FOUNDSEAT + while read LINE || [[ -n "$LINE" ]] + do case $LINE in - #*)make_lines "${LINE}" "${OUTPUT}";; + "#autologin-user="*);; + "["*) + if [[ -n "$FOUNDSEAT" ]] + then + OUTPUT=$(make_lines "autologin-user=${USERNAME}" "${OUTPUT}") + SETAUTO="true" + fi + unset FOUNDSEAT + ;; + "[Seat:"* | "[SeatDefaults]" )FOUNDSEAT="true";; + #*)OUTPUT=$(make_lines "${LINE}" "${OUTPUT}");; autologin-user=*) - make_lines "autologin-user=${USERNAME}" "${OUTPUT}" - SETAUTO="true" + if [[ -z "$SETAUTO" ]] + then + MODDEDLINE="autologin-user=${USERNAME}" + [[ -z "$FOUNDSEAT" ]] && MODDEDLINE="[Seat:*] +${MODDEDLINE}" + OUTPUT=$(make_lines "${MODDEDLINE}" "${OUTPUT}") + SETAUTO="true" + fi ;; - *)make_lines "${LINE}" "${OUTPUT}";; + *)OUTPUT=$(make_lines "${LINE}" "${OUTPUT}");; esac - done < "${thisCHROOT}/etc/lightdm/lightdm.conf" - if [[ -z "${OUTPUT}" ]] - then - echo -e "${DEFAULT_FILE}" | sudo tee "${thisCHROOT}/etc/lightdm/lightdm.conf" - LOGecho "$Autologinfor: $USERNAME." - return - fi - [[ -z "$SETAUTO" ]] && OUTPUT="${OUTPUT}\nautologin-user=${USERNAME}" - echo -e "${OUTPUT}" | sudo tee "${thisCHROOT}/etc/lightdm/lightdm.conf" - (( $? !=0 )) && LOGecho "$Noautologinfor: $USERNAME." && return - LOGecho "$Autologinfor: $USERNAME.";; - *)LOGecho "$Noautologinfor: $USERNAME.";; - esac - + done < "${thisCHROOT}/etc/lightdm/lightdm.conf" + if [[ -z "${OUTPUT}" ]] + then + OUTPUT="${DEFAULT_FILE}" + fi + if [[ -z "$SETAUTO" ]] + then + OUTPUT="${OUTPUT} +[SeatDefaults] +autologin-user=${USERNAME}" + fi + echo "${OUTPUT}" | sudo tee "${thisCHROOT}/etc/lightdm/lightdm.conf" + retval="$?" + clear + (( retval !=0 )) && LOG_ECHO "$Noautologinfor: $USERNAME." && return 1 + LOG_ECHO "$Autologinfor: $USERNAME." + fi + return 0 } ## new user configuration ## usersetup(){ @@ -274,35 +298,39 @@ then for i in "${Uname[@]}" do - chroot "${CHROOT}" bash -c "deluser \"$i\"" && LOGecho "$Remove_tarball_user: $i" - chroot "${CHROOT}" bash -c "delgroup \"$i\"" && LOGecho "$Removedtarballgroupnamed: $i" - /bin/bash -c "rm -Rf $CHROOT/home/\"$i\"" && LOGecho "$Removing $CHROOT/home/$i" + if [[ -n "$i" ]] + then + chrootCommand "$CHROOT" "user-config" "deluser '$i'" && LOG_ECHO "$Remove_tarball_user: $i" + chrootCommand "$CHROOT" "user-config" "delgroup $i" && LOG_ECHO "$Removedtarballgroupnamed: $i" + /bin/bash -c "rm -Rf $CHROOT/home/$i" && LOG_ECHO "$Removing $CHROOT/home/$i" + fi done fi fi done NEWUSER="" smallestWidth="250" +## enter the new user's name while [[ -z "$NEWUSER" ]] do LANG="$currlang" if [[ "$USEZENITY" == "true" ]] then - NEWUSER=$(zenity --class=OBI --entry --width="$smallestWidth" --title="$OneButtonInstaller" "$ZEN_ICON" --text="$Enteryournewusersname") + NEWUSER=$(zenity --class=OBI --entry --width="$smallestWidth" --title="$OneButtonInstaller" "$ZEN_ICON" --text="$Enteryournewusersname" 2>/dev/null) else NEWUSER=$(dialog --inputbox "$Enteryournewusersname: " 0 0 3>&1 1>&2 2>&3 3>&- );echo "$NEWUSER" fi done export NEWUSER - chroot "${CHROOT}" bash -c "useradd -s /bin/bash -m \"$NEWUSER\"" && LOGecho "$Added $NEWUSER" + chrootCommand "$CHROOT" "user-config" "useradd -s /bin/bash -m '$NEWUSER'" && LOG_ECHO "$Added $NEWUSER" psw=false - +## password setting while ! $psw do if [[ "$USEZENITY" == "true" ]] then - psw1=$(zenity --class=OBI --password "${ZEN_ICON}" --width=451 --title="$OneButtonInstallerCreatePassword") - psw2=$(zenity --class=OBI --password "${ZEN_ICON}" --width="$smallestWidth" --title="$Repeatthepassword") + psw1=$(zenity --class=OBI --password "${ZEN_ICON}" --width=451 --title="$OneButtonInstallerCreatePassword" 2>/dev/null) + psw2=$(zenity --class=OBI --password "${ZEN_ICON}" --width="$smallestWidth" --title="$Repeatthepassword" 2>/dev/null) else ans=$(dialog --ok-label "$Submit" \ --backtitle "$OneButtonInstallerCreatePassword" \ @@ -324,7 +352,7 @@ lengthOpsw=$(( lengthOpsw )) if (( lengthOpsw < 6 )) then - echoout "$tooshortpassworduseatleast6characters" + ECHO "$tooshortpassworduseatleast6characters" read -n1 -t3 psw=false elif [[ "$psw1" == "$psw2" ]] @@ -334,16 +362,16 @@ MSG="$thepasswordentriesmatchgoahead" psw=true else - echoout "$SPACESNOTALLOWEDINPASSWORDSTryagainplease" + ECHO "$SPACESNOTALLOWEDINPASSWORDSTryagainplease" psw=false fi else - echoout "$thepasswordsdonotmatchtryagain" + ECHO "$thepasswordsdonotmatchtryagain" read -n1 -t3 psw=false fi done - chroot "${CHROOT}" bash -c "echo \"$NEWUSER:$psw1\" | chpasswd" && MSG="$MSG\n\n$setpasswordfor $NEWUSER" + chrootCommand "$CHROOT" "user-config" "echo $NEWUSER:$psw1 | chpasswd" && MSG="$MSG\n\n$setpasswordfor $NEWUSER" [[ -f "$fpsw" ]] && shred "$fpsw" psw1=\ ' ' @@ -351,79 +379,85 @@ ans="$psw1 $psw2" unset psw1 psw2 ans [[ -f "$fpsw" ]] && rm "$fpsw" - chroot "${CHROOT}" bash -c "usermod -a -G ${MY_GROUPS} \"$NEWUSER\"" && MSG="$MSG\n\n$NEWUSER\n$addedtogroups $MY_GROUPS" + chrootCommand "$CHROOT" "user-config" "usermod -a -G ${MY_GROUPS} $NEWUSER" && MSG="$MSG\n\n$NEWUSER\n$addedtogroups $MY_GROUPS" [[ "$USEZENITY" == "true" ]] && MSG="${MSG//\\n/
}" - LOGecho "$MSG" + LOG_ECHO "$MSG" + ## check to see if lightdm is installed - LIGHT_DM=$(chroot "${CHROOT}" bash -c "which lightdm") + LIGHT_DM=$(chrootCommand "$CHROOT" "user-config" "which lightdm") if [[ -n "${LIGHT_DM}" ]] then lightdm_setup "${NEWUSER}" "${CHROOT}" else - echoout "[$WARNING] $LightDmisnotinstalledonthetarballThismaybeasoftwarebug + ECHO "[$WARNING] $LightDmisnotinstalledonthetarballThismaybeasoftwarebug $NOT_MY_BUG" fi ## END LIGHTDM IF + ## check to make sure the XDG dirs exist... - XDG_U_DIRS=$(chroot "${CHROOT}" bash -c "which xdg-user-dirs-update") - XDG_G_DIRS=$(chroot "${CHROOT}" bash -c "which xdg-user-dirs-gtk-update") + XDG_U_DIRS=$(chrootCommand "$CHROOT" "user-config" "which xdg-user-dirs-update") + XDG_G_DIRS=$(chrootCommand "$CHROOT" "user-config" "which xdg-user-dirs-gtk-update") if [[ -n "${XDG_G_DIRS}" ]] then if [[ "$USEZENITY" == "true" ]] then - chroot "${CHROOT}" bash -c "export HOME=\"/home/$NEWUSER\" && export USER=\"$NEWUSER\" && sudo -u \"$NEWUSER\" ${XDG_U_DIRS} && sudo -u \"$NEWUSER\" ${XDG_G_DIRS}" && LOGecho "$updating xdg-dirs" + chrootCommand "$CHROOT" "user-config" "export HOME=/home/$NEWUSER && export USER=$NEWUSER && sudo -u $NEWUSER ${XDG_U_DIRS} && sudo -u $NEWUSER ${XDG_G_DIRS}" && LOG_ECHO "$updating xdg-dirs" else - chroot "${CHROOT}" bash -c "export HOME=\"/home/$NEWUSER\" && export USER=\"$NEWUSER\" && sudo -u \"$NEWUSER\" ${XDG_U_DIRS} && sudo -u \"$NEWUSER\" ${XDG_G_DIRS}" && echoout "$updatedmenusandxdgdirsandgtkdirs" + chrootCommand "$CHROOT" "user-config" "export HOME=/home/$NEWUSER && export USER=$NEWUSER && sudo -u $NEWUSER ${XDG_U_DIRS} && sudo -u $NEWUSER ${XDG_G_DIRS}" && LOG_ECHO "$updatedmenusandxdgdirsandgtkdirs" fi fi +## update menus if [[ -n "${XDG_U_DIRS}" ]] && [[ "${RELEASE}" != "xenial" ]] then menuUpdater fi +## make sure skel gets copied and their home dir has the right permissions + chrootCommand "$CHROOT" "user-config" "cp -a /etc/skel/.*[a-zA-Z0-9] /home/$NEWUSER " && LOG_ECHO "copied /etc/skel" + chrootCommand "$CHROOT" "user-config" "sudo chown -R $NEWUSER:$NEWUSER /home/$NEWUSER" && LOG_ECHO "$chownrecursivley /home/$NEWUSER for $NEWUSER" + chrootCommand "$CHROOT" "user-config" "sudo chmod ugo+rwx /home/$NEWUSER/.cache" && LOG_ECHO "fix/home/$NEWUSER/.cache for $NEWUSER" - chroot "${CHROOT}" bash -c "cp -a /etc/skel/.*[a-zA-Z0-9] /home/\"$NEWUSER\" " && LOGecho "copied /etc/skel" - chroot "${CHROOT}" bash -c "sudo chown -R \"$NEWUSER\":\"$NEWUSER\" /home/\"$NEWUSER\"" && LOGecho "$chownrecursivley /home/$NEWUSER for $NEWUSER" - chroot "${CHROOT}" bash -c "sudo chmod ugo+rwx /home/\"$NEWUSER\"/.cache" && LOGecho "fix/home/$NEWUSER/.cache for $NEWUSER" - -# this is used for locate - Locate_db=$(chroot "${CHROOT}" bash -c "which updatedb || which updatedb.mlocate") +# this is used for locate updating + Locate_db=$(chrootCommand "$CHROOT" "user-config" "which updatedb || which updatedb.mlocate") if [[ -n "${Locate_db}" ]] then if [[ "$USEZENITY" == "true" ]] then - chroot "${CHROOT}" bash -c "sudo ${Locate_db}" | zenity --class=OBI --progress "${ZEN_ICON}" --width=300 --title="$updating locate" --text="$updating locate" --pulsate --auto-close --no-cancel + chrootCommand "$CHROOT" "user-config" "sudo ${Locate_db}" | zenity --class=OBI --progress "${ZEN_ICON}" --width=300 --title="$updating locate" --text="$updating locate" --pulsate --auto-close --no-cancel 2>/dev/null else - chroot "${CHROOT}" bash -c "sudo ${Locate_db}" + chrootCommand "$CHROOT" "user-config" "sudo ${Locate_db}" fi else - LOGecho "[$WARNING] $updatedbORupdatedbmlocatenotlocatedontarball + LOG_ECHO "[$WARNING] $updatedbORupdatedbmlocatenotlocatedontarball $NOT_MY_BUG" fi ## This is here just for posterity sake. # grep -A 3 "sudo-mode" "${CHROOT}"/usr/share/gconf/schemas/gksu.schemas - chroot "${CHROOT}" bash -c "sudo -u \"$NEWUSER\" gconftool-2 --set /apps/gksu/sudo-mode --type boolean true" && LOGecho "$changedgksutosudomodefor $NEWUSER" + chrootCommand "$CHROOT" "user-config" "sudo -u $NEWUSER gconftool-2 --set /apps/gksu/sudo-mode --type boolean true" && LOG_ECHO "$changedgksutosudomodefor $NEWUSER" } ## END usersetup() +## this function has been superseeded by the GUI version `zoned-out` just kept in for posterity's sake old_school_tz(){ if [[ "$USEZENITY" == "true" ]] then - ThisTerm=$(which xterm) - [[ -n "$ThisTerm" ]] && ThisTerm="$(which xterm) -fa default -fs 14 -title" - [[ -z "$ThisTerm" ]] && ThisTerm="$(which x-terminal-emulator) -t" - [[ -z "$ThisTerm" ]] && LOGecho "No terminal emulator found" + ThisTerm="$(which xterm 2>/dev/null)" + [[ -n "$ThisTerm" ]] && ThisTerm="$ThisTerm -fa default -fs 14 -title" + [[ -z "$ThisTerm" ]] && ThisTerm="$(which x-terminal-emulator 2>/dev/null) -t" + [[ -z "${ThisTerm// -t}" ]] && LOG_ECHO "No terminal emulator found" [[ -n "$ThisTerm" ]] && $ThisTerm "$configureTimeZone" -e "chroot ${CHROOT} bash -c 'dpkg-reconfigure tzdata'" else - chroot "${CHROOT}" bash -c "dpkg-reconfigure tzdata" 2>> "/dev/null" || TZ_EXISTS=$(chroot "${CHROOT}" bash -c "which tzselect") + chrootCommand "$CHROOT" "user-config" "dpkg-reconfigure tzdata" 2> "/dev/null" || TZ_EXISTS=$(chrootCommand "$CHROOT" "user-config" "$(which tzselect 2> /dev/null)") fi if [[ -n "${TZ_EXISTS}" ]] then TIME=$("${TZ_EXISTS}") - TZ_LINE="TZ=\"${TIME}\"; export TZ" - LOGecho "$TZ_LINE" - chroot "${CHROOT}" bash -c "echo \"$TZ_LINE\" >> /home/\"$NEWUSER\"/.profile;" && LOGecho "$setusertimeto: $TIME" - chroot "${CHROOT}" bash -c "echo \"$TIME\"> /etc/timezone" && LOGecho "$setsystemwidetimeto: $TIME" + TZ_LINE="TZ=${TIME}; export TZ" + LOG_ECHO "$TZ_LINE" + chrootCommand "$CHROOT" "user-config" "echo $TZ_LINE | tee -a /home/$NEWUSER/.profile;" && LOG_ECHO "$setusertimeto: $TIME" + chrootCommand "$CHROOT" "user-config" "echo $TIME | tee /etc/timezone" && LOG_ECHO "$setsystemwidetimeto: $TIME" fi } + +## configure time zone timezone(){ ZONED_OUT="$(which zoned-out)" [[ -z "$ZONED_OUT" ]] && ZONED_OUT="$dpath/zoned-out" @@ -439,32 +473,37 @@ old_school_tz fi } + +## this has been superseeded by `locale-lister` and `keyboard-switcher` old_school_keyboard(){ - DPKG_R_EXISTS=$(chroot "${CHROOT}" bash -c "which dpkg-reconfigure") + DPKG_R_EXISTS=$(chrootCommand "$CHROOT" "user-config" "which dpkg-reconfigure") if [[ -n "${DPKG_R_EXISTS}" ]] then if [[ "$USEZENITY" == "true" ]] then - ThisTerm=$(which xterm) - [[ -n "$ThisTerm" ]] && ThisTerm="$(which xterm) -fa default -fs 14 -title" + ThisTerm="$(which xterm 2>/dev/null)" + [[ -n "$ThisTerm" ]] && ThisTerm="$ThisTerm -fa default -fs 14 -title" [[ -z "$ThisTerm" ]] && ThisTerm="$(which x-terminal-emulator) -t" - [[ -z "$ThisTerm" ]] && LOGecho "No terminal emulator found" + [[ -z "${ThisTerm// -t}" ]] && LOG_ECHO "No terminal emulator found" [[ -n "$ThisTerm" ]] && $ThisTerm "$configureKB" -e "chroot ${CHROOT} bash -c 'dpkg-reconfigure keyboard-configuration 2>/dev/null&& dpkg-reconfigure locales 2>/dev/null'" 2>> "/dev/null" else - chroot "${CHROOT}" bash -c "${DPKG_R_EXISTS} keyboard-configuration && dpkg-reconfigure locales" + chrootCommand "$CHROOT" "user-config" "${DPKG_R_EXISTS} keyboard-configuration && dpkg-reconfigure locales" fi else - LOGecho "[$WARNING] $dpkgreconfigurenotinstalledonsystemtarball + LOG_ECHO "[$WARNING] $dpkgreconfigurenotinstalledonsystemtarball $NOT_MY_BUG" fi } + +## configure the locale and keyboard keyboard(){ LOCALE_OUT="$(which locale-lister)" KB_KB="$(which keyboard-switcher)" - [[ -z "$LOCALE_OUT" ]] && ZONED_OUT="$dpath/locale-lister" + [[ -z "$LOCALE_OUT" ]] && LOCALE_OUT="$dpath/locale-lister" [[ -z $KB_KB ]] && KB_KB="$dpath/keyboard-switcher" if [[ -x "$LOCALE_OUT" ]] && [[ -x "$KB_KB" ]] then + LOG_ECHO "Using zenity keyboard/locale configurations" retval=1 while (( retval != 0 )) do @@ -478,17 +517,17 @@ retval=$? done else + LOG_ECHO "Using dkpg keyboard configurer" old_school_keyboard fi } -## This is used in cpu function + +## This is used in cpu function to run the pae kernel installer pae(){ width=330 height=80 - mount --bind /dev "${CHROOT}"/dev && - cp "$dpath"/install-pae "${CHROOT}"/usr/bin && chmod +x "${CHROOT}"/usr/bin/install-pae && LOGecho "copied install-pae to $CHROOT" - cp /etc/resolv.conf "${CHROOT}"/etc/resolv.conf - cp /etc/hosts "${CHROOT}"/etc/hosts + startCHROOT "${CHROOT}" "user-config" + cp "$dpath"/install-pae "${CHROOT}"/usr/bin && chmod +x "${CHROOT}"/usr/bin/install-pae && LOG_ECHO "copied install-pae to $CHROOT" if [[ "$USEZENITY" == "true" ]] then tailfile="${CHROOT}/home/$NEWUSER/pae.tail" @@ -496,58 +535,80 @@ #( tail -f "$tailfile" |zenity --class=OBI --progress --title="$INSTALLINGpaeKernel" --width=270 --height=80 --text="$INSTALLINGpaeKernel" --percentage=0 --auto-close --no-cancel "$ZEN_ICON" 2>> "/dev/null") & #pid1="$(pgrep -n tail)" #echo "$pid1" >> "$HOME"/.pid - chroot "${CHROOT}" bash -c "install-pae $NEWUSER" |zenity --class=OBI --progress --title="$INSTALLINGpaeKernel" --width=270 --height=80 --text="$INSTALLINGpaeKernel" --width="$width" --height="$height" --pulsate --auto-close --no-cancel "$ZEN_ICON" + chrootCommand "$CHROOT" "user-config" "install-pae $NEWUSER" |zenity --class=OBI --progress --title="$INSTALLINGpaeKernel" --width=270 --height=80 --text="$INSTALLINGpaeKernel" --width="$width" --height="$height" --pulsate --auto-close --no-cancel "$ZEN_ICON" 2>/dev/null #kill -9 "$pid1" pid="$(pgrep -n zenity)" - dpath=$(getpath) + dpath=$(getDpath) "$dpath"/position_win "$pid" "$width" "$height" "2" else - chroot "${CHROOT}" bash -c "install-pae $NEWUSER" + chrootCommand "$CHROOT" "user-config" "install-pae $NEWUSER" fi rm "${CHROOT}"/usr/bin/install-pae + endCHROOT "${CHROOT}" "user-config" } +## if the computer is 64bit warn the user if the OS is not 64bit sixty_fourbit(){ - LM=$(grep -o -w 'lm' /proc/cpuinfo | sort -u) - LSCPUinfo=$(lscpu | grep Architecture:) + LM="$(grep -o -w 'lm' /proc/cpuinfo | sort -u 2>/dev/null)" + LSCPUinfo="$(lscpu | grep Architecture: 2>/dev/null)" LSCPUinfo="${LSCPUinfo/* }" - DPKGarch=$(chroot "${CHROOT}" bash -c "dpkg --print-architecture") + DPKGarch=$(chrootCommand "$CHROOT" "user-config" "dpkg --print-architecture") if [[ "$LM" == "lm" ]] then - LOGecho "$processor64bit" + LOG_ECHO "$processor64bit" if [[ "$DPKGarch" != "amd64" ]] && [[ "${LSCPUinfo/x86_64}" != "$LSCPUinfo" ]] then - echoout "$Youmightwanttoconsiderusinga64bitoperatingsystem" + ECHO "$Youmightwanttoconsiderusinga64bitoperatingsystem" retval=$? fi else - LOGecho "$CPUisnot64bit" + LOG_ECHO "$CPUisnot64bit" retval=1 fi } + +## general CPU based kernel setup cpu(){ - LMchroot=$(lscpu | grep Architecture:) + LMchroot="$(lscpu | grep Architecture: 2>/dev/null)" LMchroot="${LMchroot/* }" - DPKGarch=$(chroot "${CHROOT}" bash -c "dpkg --print-architecture") + DPKGarch=$(chrootCommand "$CHROOT" "user-config" "dpkg --print-architecture") + #CHROOT_PAE=$(chrootCommand "$CHROOT" "user-config" "grep -m1 pae /proc/cpuinfo") + #sixty_fourbit if [[ "${LMchroot/x86_64}" != "${LMchroot}" ]] then if [[ "${DPKGarch/amd64}" != "${DPKGarch}" ]] then - LOGecho "$NOpaeSixtyFourBit" + LOG_ECHO "$NOpaeSixtyFourBit" return fi fi -[[ "${DISTRO/Ubuntu}" != "${DISTRO}" ]] && [[ "${DISTRO/ 4.?.?}" != "${DISTRO}" ]] && LOGecho "This release of Ubuntu kernel does not support non PAE $DISTRO" && return + + RELEASE=$(getChrootRelease "$CHROOT" "user-config") + TestTrue $? "user-config" "The chroot ($CHROOT) release is: $RELEASE" + ## Check the release to see if non PAE is even possible... and return if it is not + if [[ "${DISTRO/Ubuntu}" != "${DISTRO}" ]] && [[ "${DISTRO/ 4.?.?}" != "${DISTRO}" ]] + then + LOG_ECHO "This release of Ubuntu kernel does not support non PAE $DISTRO" + return 0 + fi ## PAE ## grep -m1 pae /proc/cpuinfo retval="$?" if (( retval == 0 )) then - LOGecho "$ComputersupportsPAE" + LOG_ECHO "$ComputersupportsPAE" if [[ "$USEZENITY" == "true" ]] then - zenity --class=OBI --question "${ZEN_ICON}" --title="$ComputersupportsPAE" --text="$DoyouwanttoinstallthePAEkernelnowIfyouareunsureyoucanalwaysattempttodothislater\n$THISMAYTAKETIME" + BIG=600 + SMALL=510 + WIDTH=$BIG + if bigOrSmall + then + WIDTH=$SMALL + fi + + zenity --class=OBI --question "${ZEN_ICON}" --title="$ComputersupportsPAE" --width="$WIDTH" --text="$DoyouwanttoinstallthePAEkernelnowIfyouareunsureyoucanalwaysattempttodothislater\n$THISMAYTAKETIME" 2>/dev/null retval="$?" else dialog --title "$ComputersupportsPAE" --clear --yesno "$DoyouwanttoinstallthePAEkernelnowIfyouareunsureyoucanalwaysattempttodothislater\n$THISMAYTAKETIME" 10 30 @@ -556,25 +617,35 @@ case $retval in 0) pae - LOGecho "$YesinstallPAEchosen";; + LOG_ECHO "$YesinstallPAEchosen";; *) - LOGecho "$NoinstallPAEchosen";; + LOG_ECHO "$NoinstallPAEchosen";; esac else - LOGecho "$CPUhasnoPAEflag" + LOG_ECHO "$CPUhasnoPAEflag" fi ## 64 bit ## #sixty_fourbit } upgrade_kernel(){ -echoout "upgrade to the next LTS stack" + ## not sure if I will ever do this.... Debian and Ubuntu do this differently, and I would have to manually add each release to check :( AFAIK + ECHO "upgrade to the next LTS stack" ## place holder to upgrade stack... } +## update the system in a chroot updateSystem(){ + BIG=535 + SMALL=510 + WIDTH=$BIG + if bigOrSmall + then + WIDTH=$SMALL + fi + if [[ "$USEZENITY" == "true" ]] then - zenity --class=OBI --question "${ZEN_ICON}" --title="$UPDATEpackages" --width=535 --text="$UPDATEpackages" + zenity --class=OBI --question "${ZEN_ICON}" --title="$UPDATEpackages" --width="$WIDTH" --text="$UPDATEpackages" 2>/dev/null retval="$?" else dialog --title "$UPDATEpackages" --clear --yesno "$UPDATEpackages" 10 30 @@ -582,39 +653,34 @@ fi case $retval in 0) -## add devpts - LOGecho "Updating System........" - mount -t proc proc "$CHROOT"/proc - mount -t sysfs sys "$CHROOT"/sys - mount -o bind /dev "$CHROOT"/dev - mount -t devpts /dev/pts "$CHROOT"/dev/pts - cp /etc/resolv.conf "${CHROOT}"/etc/resolv.conf - cp /etc/hosts "${CHROOT}"/etc/hosts - TORIUPDATER=$(chroot "$CHROOT" bash -c "which torios-packagetool") +## use obi-functions to start the chroot, and update everything and then end the chroot + LOG_ECHO "Updating System........" + startCHROOT "${CHROOT}" "user-config" + TORIUPDATER=$(chrootCommand "$CHROOT" "user-config" "which torios-packagetool") if [[ -n "$TORIUPDATER" ]] then COMMAND="torios-packagetool --update" else COMMAND="sudo apt-get update && sudo apt-get -y dist-upgrade" fi - LOGecho "Using the command: \"$COMMAND\" for the update" + LOG_ECHO "Using the command: $COMMAND for the update" if [[ "$USEZENITY" == "true" ]] then - thisTerm=$(which xterm) - [[ -n "$ThisTerm" ]] && ThisTerm="$(which xterm) -fa default -fs 14 -title" + ThisTerm="$(which xterm)" + [[ -n "$ThisTerm" ]] && ThisTerm="$ThisTerm -fa default -fs 14 -title" [[ -z "$ThisTerm" ]] && ThisTerm="$(which x-terminal-emulator) -t" - [[ -z "$ThisTerm" ]] && LOGecho "No terminal emulator found" + [[ -z "${ThisTerm// -t}" ]] && LOG_ECHO "No terminal emulator found" [[ -n "$ThisTerm" ]] && $ThisTerm "$UPDATINGpackages" -e "chroot ${CHROOT} bash -c \"$COMMAND\"" else - bash -c "$COMMAND" + chrootCommand "$CHROOT" "$COMMAND" fi - umount "$CHROOT"/dev/pts - umount "$CHROOT"/{proc,sys,dev} && LOGecho "Unmounted everything after finishing the update" + endCHROOT "${CHROOT}" "user-config" ;; *);; esac } -### The main program: + +### The main program order: usersetup timezone keyboard diff -Nru obi-installer-3.3.0ubuntu0/OBI/zmktbl obi-installer-3.4.0ubuntu0/OBI/zmktbl --- obi-installer-3.3.0ubuntu0/OBI/zmktbl 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/zmktbl 2018-03-15 13:13:10.000000000 +0000 @@ -17,10 +17,12 @@ # 2014-09-02 israeldahl added the ability to specify tarball destination # 2015-04-16 sudodus path in filename # 2015-04-16 sudodus inline mktbl 'imktbl' in zmktbl -. gettext.sh +eval_gettext(){ + echo "$*" +} +source gettext.sh export TEXTDOMAIN=obi-installer ########################################################### -TextnotFound=$(eval_gettext "Text not found. Change directory!") TITLE=$(eval_gettext "make tarball master menu") WindowText=$(eval_gettext "Select an action (a line) from the list below or use the current value") Hotkey=$(eval_gettext "Hotkey:") @@ -46,8 +48,8 @@ Compression=$(eval_gettext "Compression") maketarxzfile=$(eval_gettext "make a 'tar.xz' file") maketargzfile=$(eval_gettext "make a 'tar.gz' file") -# select-compression is a function -Errorinselectcompression=$(eval_gettext "Error in select-compression") +# select_compression is a function +Errorinselectcompression=$(eval_gettext "Error in select_compression") Selecttargetfile=$(eval_gettext "Select target file") Thereshouldbeenoughspaceforthenewtarball=$(eval_gettext "There should be enough space for the new tarball") Doyouwanttomakethistarball=$(eval_gettext "Click this if you want to make this tarball") @@ -77,11 +79,24 @@ Thesemaincommandsareprepared=$(eval_gettext "These main commands are prepared:") # \n separates lines so put those in correct places supercompressedXZ=$(eval_gettext "Do you want to use -9e compression for the XZ?\nThis will make the tarball significantly smaller, but will take MUCH longer to compress.") -########################################################### +################################################ +## Source our handy functions!! +## make sure they are in the PATH first +OBI_SHARE_DIR="/usr/share/OBI" +if [[ -d "${OBI_SHARE_DIR}" ]] && [[ "${PATH/$OBI_SHARE_DIR}" == "${PATH}" ]] +then + PATH="${PATH}:/usr/share/OBI" + export PATH +elif [[ "${PATH/$PWD}" == "${PATH}" ]] +then + PATH="${PATH}:${PWD}" + export PATH +fi +source obi-functions || exit +################################################ +[[ -n "$(which zenity 2>/dev/null)" ]] && echo "true" > "$HOME/usezenity" echoout() { - zenity --info --text "$*" - sleep .7 - echo -e "[zMktbl] $*" >> "${HOME}"/obi-installer.log + echoOut "zMktbl" "$*" } [[ -z "${LANG}" ]] && LANG=C @@ -90,58 +105,42 @@ export LANGUAGE # Global variables -WINDOW_ICON="/usr/share/icons/hicolor/64x64/apps/zmktbl.png" -partitions="/usr/share/OBI/partitions" +WINDOW_ICON="$(getXDGdir icons)/hicolor/64x64/apps/zmktbl.png" +partitions="$(getPartitions)" prtn="not_selected" cmpr="xz" myid=$(who|grep -m1 -e ' tty'|cut -d ' ' -f1) if [[ -n "$myid" ]] && [[ "$myid" != "root" ]] && test -d /home/"$myid" then - home=/home/"$myid" + home=/home/"$myid" else - myid=$(who|grep -m1 -e ' pts/'|cut -d ' ' -f1) - if [[ -n "$myid" ]] && [[ "$myid" != "root" ]] && test -d /home/"$myid" - then - home=/home/"$myid" - else - home="$HOME" - fi + myid=$(who|grep -m1 -e ' pts/'|cut -d ' ' -f1) + if [[ -n "$myid" ]] && [[ "$myid" != "root" ]] && test -d /home/"$myid" + then + home=/home/"$myid" + else + home="$HOME" + fi fi trgt="$home/ball" ## check for dpath... make it more general -if [ -f "/home/$USER/select-part2" ] -then - dpath="/home/$USER" -elif [ -f "${HOME}/select-part2" ] -then - dpath="${HOME}" -elif [ -f "${PWD}/select-part2" ] -then - dpath="${PWD}" -elif [ -f /usr/share/OBI/select-part2 ] -then - dpath="/usr/share/OBI/" -else - echoout "$TextnotFound" - exit 1 -fi +dpath="$(getDpath)" mkmaster() { - # Write in $HOME and move the tarball to /tarballs if it is writable. -if [ "${dpath}" != "/usr/share/OBI" ] -then - mkdir -p "/usr/share/OBI" -fi -cd "/usr/share/OBI" -echo "obi-root:$prtn" > "$partitions" - -ans= -while [ "$ans" != "$ans_q" ] && [ "$ans" != "x" ] || [ "$prtn" == "not_selected" ] -do - ans=$(zenity --list --width=760 --height=320 \ + if [[ "${dpath}" != "/usr/share/OBI" ]] + then + mkdir -p "/usr/share/OBI" + fi + cd "/usr/share/OBI" + echo "obi-root:$prtn" > "$partitions" + + unset ans + while [[ "$ans" != "$ans_q" ]] && [[ "$ans" != "x" ]] || [[ "$prtn" == "not_selected" ]] + do + ans=$(zenity --list --width=760 --height=320 \ --title="zMktbl - $TITLE" --cancel-label="$Quit" \ --window-icon="${WINDOW_ICON}" \ --text="$WindowText" \ @@ -151,64 +150,45 @@ "$ans_t" "$Target " "$trgt" \ "$ans_q" "$Quit" "" 2> /dev/null ) - if [ "$?" -ne 0 ] - then - return - elif [ "$ans" == "$ans_q" ] - then - return - fi - - ans=${ans:0:1} # fix for buggy(?) zenity --list in trusty - -# echo "xxx $ans xxx" - - if [ "$ans" == "$ans_s" ] - then - "${dpath}"/select-part2 root zmktbl # zenity + if (( $? != 0 )) || [[ "$ans" == "$ans_q" ]] + then + return + fi + + ans=${ans:0:1} # fix for buggy(?) zenity --list in trusty + [[ -z "$ans" ]] && ans="x" + case $ans in + "$ans_s") + "${dpath}"/select-part2 root zmktbl # zenity # save the selected partition (file and static variable) # read prtn < "$partitions" - while read LINE || [[ "$LINE" ]] - do - case $LINE in - obi-root:*)prtn="${LINE/*:}";; - *);; - esac - done < "$partitions" -echo > "$partitions" -# echo mkmaster -# cat "$partitions" -# pwd -# ls -l "$partitions" - - elif [ "$ans" == "$ans_c" ] - then - select-compression # zenity --list --radiolist + while read LINE || [[ "$LINE" ]] + do + case $LINE in + obi-root:*)prtn="${LINE/*:}";; + *);; + esac + done < "$partitions" + echo > "$partitions" + ;; + "$ans_c")select_compression;; # zenity --list --radiolist # save the selected compression (static variable) - elif [ "$ans" == "$ans_t" ] - then - select-target-file # zenity --file-selection + "$ans_t")select_target_file;; # zenity --file-selection # save the selected file (static variable) - elif [ "$ans" == "" ] - then - ans="x" - else - echoout "$Errorinmkmaster" - fi -done - + *)echoout "$Errorinmkmaster";; + esac + done # call inline mktbl imktbl - -imktbl + imktbl } ####################################################################### -function select-compression { +select_compression(){ -ans=$(zenity --list --width=640 --height=200 \ + ans=$(zenity --list --width=640 --height=200 \ --title="zMktbl - $selectcompression" --cancel-label="$Quit" \ --window-icon="${WINDOW_ICON}" \ --text="$Clicktheradiobuttontoselectcompression" \ @@ -218,96 +198,135 @@ --column="" --column="$Compression" \ "$TRUE" "xz - $maketarxzfile" \ "$FALSE" "gzip - $maketargzfile" 2> /dev/null ) + (( $? != 0 )) && return -if [ $? -ne 0 ] -then - return -fi - -echo "$ans" + echo "$ans" -if [ "${ans:0:2}" == "xz" ] -then - cmpr="xz" -elif [ "${ans:0:4}" == "gzip" ] -then - cmpr="gzip" -else - echoout "$Errorinselectcompression" -fi + if [[ "${ans:0:2}" == "xz" ]] + then + cmpr="xz" + elif [[ "${ans:0:4}" == "gzip" ]] + then + cmpr="gzip" + else + echoout "$Errorinselectcompression" + fi } ####################################################################### -function select-target-file { - -ans=$(zenity --file-selection --title "zMktbl - $Selecttargetfile" \ +select_target_file(){ + ans=$(zenity --file-selection --title "zMktbl - $Selecttargetfile" \ --window-icon="${WINDOW_ICON}" \ --confirm-overwrite --filename="$trgt" --save \ --file-filter=*.{tar*,iso,img,img.?z,tar.?z} 2> /dev/null ) -echo "$ans" -trgt=${ans/.tar.[gx]z} + echo "$ans" + trgt="${ans/.tar.[gx]z}" } ####################################################################### +fancyTarball(){ + thisDIR="$1" + thisTARBALL="$2" + thisCOMPRESSION="$3" + + [[ -d "$thisDIR" ]] || return 1 + + case $thisCOMPRESSION in + "xz")compr="xz";; + "gz")compr="gzip";; + *) + echolog "$thisCOMPRESSION not supported" + return 1 + ;; + esac + currdir="$PWD" + [[ "$currdir" == "$thisDIR" ]] && currdir="$HOME" + [[ "${thisTARBALL/*\/}" == "${thisTARBALL}" ]] && thisTARBALL="${currdir}/${thisTARBALL}" + [[ "${thisTARBALL/.tar}" == "${thisTARBALL}" ]] && thisTARBALL="${thisTARBALL}.tar" + [[ "${thisTARBALL/.$thisCOMPRESSION}" == "${thisTARBALL}" ]] && thisTARBALL="${thisTARBALL}.$thisCOMPRESSION" + echolog "Beginning the tar process for ${thisDIR} to ${thisTARBALL}" + width=400 + height=150 + cd "${thisDIR}" + + if [[ "$USEZENITY" == "true" ]] + then + width=330 + height=80 + (tar -cf - . | pv -n -s $(du -sb . | awk '{print $1}') | ${compr} > "$thisTARBALL") 2>&1| zenity --class="$ProgramName" --progress --title="$ProgramName" --width="$width" --height="$height" --text="Compressing $thisDIR" --auto-close --no-cancel + retval="$?" + else + if [[ -n "$(which dialog)" ]] + then + (tar -cf - . | pv -n -s $(du -sb . | awk '{print $1}') | ${compr} > "$thisTARBALL") 2>&1 | dialog --gauge 'Progress' 7 70 + retval="$?" + else + tar -cf - . | pv -n -s $(du -sb . | awk '{print $1}') | ${compr} > "$thisTARBALL" + retval="$?" + fi + fi + cd "$currdir" + return "$retval" +} -imktbl() { +imktbl(){ # inline mktbl imktbl for a smoother GUI experience #echo "*** imktbl: $prtn $cmpr $trgt ***" -inversvid="\0033[7m" -resetvid="\0033[0m" -compr="J" -ext="xz" -tarpath="${trgt%/*}" - -if [ "$cmpr" == "gzip" ] ||[ "$cmpr" == "z" ] -then - compr="z" - ext="gz" -fi -XZ_OPT=-9e -/bin/echo -e "${inversvid}These main commands are prepared:${resetvid} + inversvid="\0033[7m" + resetvid="\0033[0m" + compr="J" + ext="xz" + tarpath="${trgt%/*}" + + if [[ "$cmpr" == "gzip" ]] || [[ "$cmpr" == "z" ]] + then + compr="z" + ext="gz" + fi + XZ_OPT=-9e + /bin/echo -e "${inversvid}These main commands are prepared:${resetvid} mount $prtn /mnt cd /mnt tar -cv${compr}f ${trgt}.tar.$ext ." -echo -e "sudo -H $0 $tomakeatarballofthefiles\n$Partitiontobeused $prtn\n$Youmayneedtoremoveexistingtarballs\n\n$Thesemaincommandsareprepared\nmount $prtn /mnt\ncd /mnt\ntar -cv${compr}f ${trgt}.tar.$ext ." | zenity --text-info --text="/dev/stdin" \ + echo -e "sudo -H $0 $tomakeatarballofthefiles\n$Partitiontobeused $prtn\n$Youmayneedtoremoveexistingtarballs\n\n$Thesemaincommandsareprepared\nmount $prtn /mnt\ncd /mnt\ntar -cv${compr}f ${trgt}.tar.$ext ." | zenity --text-info --text="/dev/stdin" \ --width=640 --height=320 \ --title="zMktbl - $Doyouwanttomakethistarball" --cancel-label="$Quit" \ --window-icon="${WINDOW_ICON}" \ --checkbox="$Doyouwanttomakethistarball" 2> /dev/null -if [ "$?" -eq 0 ] -then + if (( $? == 0 )) + then # Remove old tarballs the create space for new tarballs - echo "----------------------------------------------------------" - str=$(df -h .) - str="$str + echo "----------------------------------------------------------" + str=$(df -h .) + str="$str $Thereshouldbeenoughspaceforthenewtarball" - ls "${tarpath}"* > /dev/null 2> /dev/null - if [ $? -eq 0 ] - then - str="$str\n$Removesomeoldtarballifnecessary" + ls "${tarpath}"* > /dev/null 2> /dev/null - echo -e "$str" | zenity --text-info --text="/dev/stdin" \ + if (( $? == 0 )) + then + str="$str\n$Removesomeoldtarballifnecessary" + + echo -e "$str" | zenity --text-info --text="/dev/stdin" \ --width=640 --height=320 \ --title="zMktbl - $Removesomeoldtarball" \ --cancel-label="$Nocontinuewithoutremovinganytarball" --ok-label="$Yesremovesomeoldtarball" \ --window-icon="${WINDOW_ICON}" \ --checkbox="$Checkthisboxifyouwanttoremovesomeoldtarball" 2> /dev/null - if [ "$?" -eq 0 ] - then - -declare -a obls=( $(ls -1 "${tarpath}"/*.tar.[gx]z|sed -e "s/\ /.'./"g -e 's/^/FALSE /') ) + if (( "$?" == 0 )) + then + declare -a obls=( $(ls -1 "${tarpath}"/*.tar.[gx]z|sed -e "s/\ /.'./"g -e 's/^/FALSE /') ) - ans=$(zenity --list --width=640 --height=560 \ + ans=$(zenity --list --width=640 --height=560 \ --title="zMktbl - $removeoldtarballs" --cancel-label="$Quit" \ --window-icon="${WINDOW_ICON}" \ --text="$Checktheboxtoselecttarballstoremove" \ @@ -316,63 +335,61 @@ --print-column="2" \ --column="" --column="$Oldtarballs" \ --checkbox="$Checkthisboxifyouwanttoremovetheseoldtarballs" \ -${obls[@]} 2> /dev/null 2> /dev/null ) +"${obls[@]}" 2> /dev/null 2> /dev/null ) - if [ "$ans" != "" ] - then - echo "rm $ans" - rm ${ans//.\'./ } - fi - fi - fi + if [[ -n "$ans" ]] + then + echo "rm ${ans//.\'./ }" + rm "${ans//.\'./ }" + fi + fi + fi # final warning -if [ "$compr" == "J" ] -then - zenity --question --text="$supercompressedXZ" 2> /dev/null - if [ "$?" -eq 0 ] - then - SUPERCOMP="YEAH!!!" - else - unset SUPERCOMP - fi -fi - -zenity --question --text="$FINALwARNING\n$trgt.tar.$ext" 2> /dev/null - -if [ "$?" -ne 0 ] -then - exit -fi - + if [[ "$compr" == "J" ]] + then + zenity --question --text="$supercompressedXZ" 2> /dev/null + if (( "$?" == 0 )) + then + SUPERCOMP="YEAH!!!" + else + unset SUPERCOMP + fi + fi + + zenity --question --text="$FINALwARNING\n$trgt.tar.$ext" 2> /dev/null + + (( "$?" != 0 )) && exit + COMPressOr="gz" + [[ "$cmpr" == "J" ]] && COMPressOr="xz" # mount the source partition and clean log files - mount "$prtn" /mnt - cd /mnt - find /mnt/var/log -type f -exec echo "> {}" \;>doer - bash doer - rm doer - if [ -n "$SUPERCOMP" ] - then - XZ_OPT=${XZ_OPT-"-9e"} - export XZ_OPT - echo "set XZ_OPT=$XZ_OPT" - echo "this will take MUCH longer" - fi + mount "$prtn" /mnt + cd /mnt + find /mnt/var/log -type f -exec echo "> {}" \;>doer + bash doer + rm doer + if [[ -n "$SUPERCOMP" ]] + then + XZ_OPT=${XZ_OPT-"-9e"} + export XZ_OPT + echo "set XZ_OPT=$XZ_OPT" + echo "this will take MUCH longer" + fi # create the tarball - - echo tar -cv"${compr}"f "${trgt}.tar.$ext" . - tar -cv"${compr}"f "${trgt}.tar.$ext" . - - echo "$trgt written, syncing now ..." - sync - cd - echo "----------------------------------------------------------" - echo "List tarballs at ${tarpath}" - ls "${tarpath}"/*.tar.[gx]z - umount /mnt - read -p "$ChecktheresultandpressEntertocontinue" -fi + fancyTarball "/mnt" "${trgt}.tar.$ext" "$COMPressOr" +# echo tar -cv"${compr}"f "${trgt}.tar.$ext" . +# tar -cv"${compr}"f "${trgt}.tar.$ext" . + + echo "$trgt written, syncing now ..." + sync + cd + echo "----------------------------------------------------------" + echo "List tarballs at ${tarpath}" + ls "${tarpath}"/*.tar.[gx]z + umount /mnt + read -p "$ChecktheresultandpressEntertocontinue" + fi } ####################################################################### @@ -381,10 +398,10 @@ # ####################################################################### -if [ "$(whoami)" == "root" ] && [ $# -eq 0 ] +if [[ "$(whoami)" == "root" ]] && (( $# == 0 )) then - mkmaster + mkmaster else - echo "$Usage: sudo -H $0 # no parameters" + echo "$Usage: sudo -H $0 # no parameters" fi diff -Nru obi-installer-3.3.0ubuntu0/OBI/zmktbl-wrapper obi-installer-3.4.0ubuntu0/OBI/zmktbl-wrapper --- obi-installer-3.3.0ubuntu0/OBI/zmktbl-wrapper 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/zmktbl-wrapper 2018-03-15 13:13:10.000000000 +0000 @@ -10,7 +10,7 @@ [[ -z "$SUDO_ASKPASS" ]] && [[ -n "$(which torios-askpass)" ]] && export SUDO_ASKPASS="$(which torios-askpass)" if [[ -n "$SUDO_ASKPASS" ]] then - sudo -AH xterm -geometry 90x24 -fa default -fs 10 -bg '#ebeceb' -fg black -T "zMktbl $CONSOLE" -e bash -c "echo \"$MSG\"; zmktbl; read -p \"$READ_MSG\"" + sudo -AH xterm -geometry 90x24 -fa default -fs 10 -bg '#ebeceb' -fg black -T "zMktbl $CONSOLE" -e bash -c "echo \"$MSG\"; zmktbl; read -p \"$READ_MSG\"" else - xterm -geometry 40x3 -fa default -fs 10 -T "zMktbl - $PASSWORD" -fg black -bg '#b4df02' -e sudo -H xterm -geometry 90x24 -fa default -fs 10 -bg '#ebeceb' -fg black -T "zMktbl $CONSOLE" -e bash -c "echo \"$MSG\"; zmktbl; read -p \"$READ_MSG\"" + xterm -geometry 40x3 -fa default -fs 10 -T "zMktbl - $PASSWORD" -fg black -bg '#b4df02' -e sudo -H xterm -geometry 90x24 -fa default -fs 10 -bg '#ebeceb' -fg black -T "zMktbl $CONSOLE" -e bash -c "echo \"$MSG\"; zmktbl; read -p \"$READ_MSG\"" fi diff -Nru obi-installer-3.3.0ubuntu0/OBI/zoned-out obi-installer-3.4.0ubuntu0/OBI/zoned-out --- obi-installer-3.3.0ubuntu0/OBI/zoned-out 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI/zoned-out 2018-03-15 13:13:10.000000000 +0000 @@ -75,7 +75,7 @@ retval=0 if [[ "$USEZENITY" == "true" ]] then - ans=$(zenity --list --height=400 --width=300 --text="$SelectTimeZone" --title="$SelectTimeZone" --column="$TimeZone" ${LIST[@]} 2>/dev/null) + ans=$(zenity --list --height=400 --width=300 --text="$SelectTimeZone" --title="$SelectTimeZone" --column="$TimeZone" "${LIST[@]}" 2>/dev/null) retval=$? else unset DIALOGLIST @@ -83,11 +83,11 @@ do DIALOGLIST=(${DIALOGLIST[@]} "$i" "$i") done - ans=$(dialog --no-shadow --backtitle "$TimeZone" --title "$TimeZone" --wmclass "OBI" --menu "$TimeZone" 19 76 12 ${DIALOGLIST[@]} 3>&1 1>&2 2>&3 3>&-) + ans=$(dialog --no-shadow --backtitle "$TimeZone" --title "$TimeZone" --wmclass "OBI" --menu "$TimeZone" 19 76 12 "${DIALOGLIST[@]}" 3>&1 1>&2 2>&3 3>&-) retval="$?" fi - (( $retval != 0 )) && return "$retval" - echo $ans + (( retval != 0 )) && return "$retval" + echo "$ans" } use_this(){ TIMEZ="$1" diff -Nru obi-installer-3.3.0ubuntu0/OBI.geany obi-installer-3.4.0ubuntu0/OBI.geany --- obi-installer-3.3.0ubuntu0/OBI.geany 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/OBI.geany 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ -[editor] -line_wrapping=false -line_break_column=72 -auto_continue_multiline=true - -[file_prefs] -final_new_line=true -ensure_convert_new_lines=false -strip_trailing_spaces=false -replace_tabs=false - -[indentation] -indent_width=4 -indent_type=1 -indent_hard_tab_width=8 -detect_indent=false -detect_indent_width=false -indent_mode=2 - -[project] -name=OBI -base_path=/home/israeldahl/bzr/one-button-installer/OBI - -[long line marker] -long_line_behaviour=1 -long_line_column=72 - -[files] -current_page=0 diff -Nru obi-installer-3.3.0ubuntu0/po/en.po obi-installer-3.4.0ubuntu0/po/en.po --- obi-installer-3.3.0ubuntu0/po/en.po 1970-01-01 00:00:00.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/po/en.po 2018-03-15 13:13:10.000000000 +0000 @@ -0,0 +1,2283 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Nio Wiklund +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-02-08 08:56-0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +# +#. ############################################################################ +# File: zoned-out, line: 36 +#, sh-format +msgid "Time Zone" +msgstr "" +# +# File: zoned-out, line: 37 +#, sh-format +msgid "Select Time Zone" +msgstr "" +# +# File: zoned-out, line: 38 +#, sh-format +msgid "Use this Time Zone:" +msgstr "" +# +#. ########################################################## +# File: zmktbl-wrapper, line: 5 +#, sh-format +msgid "" +"The zMktbl console displays output from the engine behind the zenity curtain" +msgstr "" +# +# File: zmktbl-wrapper, line: 6 +#, sh-format +msgid "Press Enter to close this zMktbl console window" +msgstr "" +# +# File: zmktbl-wrapper, line: 7 +#, sh-format +msgid "Password" +msgstr "" +# +# File: zmktbl-wrapper, line: 8 +#, sh-format +msgid "Console" +msgstr "" +# +#. ########################################################## +# File: zmktbl, line: 23 +#, sh-format +msgid "Text not found. Change directory!" +msgstr "" +# +# File: zmktbl, line: 24 +#, sh-format +msgid "make tarball master menu" +msgstr "" +# +# File: zmktbl, line: 25 +#, sh-format +msgid "Select an action (a line) from the list below or use the current value" +msgstr "" +# +# File: zmktbl, line: 26 +#, sh-format +msgid "Hotkey:" +msgstr "" +# +# File: zmktbl, line: 27 +#, sh-format +msgid "Action: Change ..." +msgstr "" +# +# File: zmktbl, line: 28 +#, sh-format +msgid "Current value" +msgstr "" +# +#. # hotkey for "Select tarball to install" +#. # Hotkey for: "iso and image file selector (easy), no search for linked files" +#. # hotkey pair with " Swap partition - select or change" +# File: zmktbl, line: 31 +# File: starter, line: 36 +# File: obi-functions, line: 48 +# File: functions, line: 46 +# File: confirm-partition, line: 39 +#, sh-format +msgid "s" +msgstr "" +# +# File: zmktbl, line: 32 +#, sh-format +msgid "Source partition" +msgstr "" +# +#. # hotkey for "Check (and repair) the file system" +# File: zmktbl, line: 33 +# File: starter, line: 52 +#, sh-format +msgid "c" +msgstr "" +# +# File: zmktbl, line: 34 +#, sh-format +msgid "Compression, gzip or xz" +msgstr "" +# +#. # hotkey for 'Tips' +#. # hotkey pair with Tips +# File: zmktbl, line: 35 +# File: starter, line: 50 +# File: confirm-partition, line: 67 +#, sh-format +msgid "t" +msgstr "" +# +# File: zmktbl, line: 36 +#, sh-format +msgid "Target file name with path" +msgstr "" +# +#. # hotkey for 'Quit' +#. # the hotkey for "Quit, no tarball selected" +#. # Hotkey for: "Quit" +#. # Hotkey for 'Quit' +#. # hotkey pair with "Quit" +# File: zmktbl, line: 37 +# File: text-mode-menu, line: 35 +# File: starter, line: 54 +# File: select-tarball, line: 12 +# File: obi-functions, line: 29 +# File: functions, line: 27 +# File: dltbl, line: 25 +# File: confirm-partition, line: 52 +#, sh-format +msgid "q" +msgstr "" +# +# File: zmktbl, line: 38 +# File: text-mode-menu, line: 40 +# File: starter, line: 34 +# File: select-part2, line: 19 +# File: obi-readme, line: 9 +# File: obi-functions, line: 30 +# File: functions, line: 28 +# File: dltbl, line: 23 +# File: confirm-partition, line: 53 +#, sh-format +msgid "Quit" +msgstr "" +# +# File: zmktbl, line: 41 +#, sh-format +msgid "Error in mkmaster" +msgstr "" +# +# File: zmktbl, line: 42 +#, sh-format +msgid "select compression" +msgstr "" +# +# File: zmktbl, line: 43 +#, sh-format +msgid "TRUE" +msgstr "" +# +# File: zmktbl, line: 44 +#, sh-format +msgid "FALSE" +msgstr "" +# +# File: zmktbl, line: 45 +#, sh-format +msgid "Click the radio button to select compression" +msgstr "" +# +# File: zmktbl, line: 46 +#, sh-format +msgid "Compression" +msgstr "" +# +# File: zmktbl, line: 47 +#, sh-format +msgid "make a 'tar.xz' file" +msgstr "" +# +# File: zmktbl, line: 48 +#, sh-format +msgid "make a 'tar.gz' file" +msgstr "" +# +# File: zmktbl, line: 50 +#, sh-format +msgid "Error in select-compression" +msgstr "" +# +# File: zmktbl, line: 51 +#, sh-format +msgid "Select target file" +msgstr "" +# +# File: zmktbl, line: 52 +# File: dltbl, line: 17 +#, sh-format +msgid "There should be enough space for the new tarball" +msgstr "" +# +# File: zmktbl, line: 53 +#, sh-format +msgid "Click this if you want to make this tarball" +msgstr "" +# +# File: zmktbl, line: 54 +#, sh-format +msgid "Remove some old tarball?" +msgstr "" +# +# File: zmktbl, line: 56 +#, sh-format +msgid "" +"Remove some old tarball(s) only if necessary, In that case,\\nplease " +"continue the dialogue in the zMktbl text console" +msgstr "" +# +# File: zmktbl, line: 57 +#, sh-format +msgid "No, continue without removing any tarball" +msgstr "" +# +# File: zmktbl, line: 58 +#, sh-format +msgid "Yes, remove some old tarball" +msgstr "" +# +# File: zmktbl, line: 59 +#, sh-format +msgid "Click this if you want to remove some old tarball" +msgstr "" +# +# File: zmktbl, line: 60 +#, sh-format +msgid "remove old tarballs" +msgstr "" +# +# File: zmktbl, line: 61 +#, sh-format +msgid "" +"Check the box to select tarballs to remove.\n" +"(spaces are replaced with .'. in the list)" +msgstr "" +# +# File: zmktbl, line: 63 +#, sh-format +msgid "Old tarballs" +msgstr "" +# +# File: zmktbl, line: 64 +#, sh-format +msgid "Click this if you want to remove these old tarballs" +msgstr "" +# +# File: zmktbl, line: 66 +#, sh-format +msgid "FINAL WARNING\\nDo you want to make this tarball?" +msgstr "" +# +#. # Enter is the Return (Enter) key on the keyboard +#. # Enter is the key on the keyboard +# File: zmktbl, line: 67 +# File: select-device, line: 17 +# File: mktbl, line: 17 +# File: dltbl, line: 32 +# File: confirm-partition, line: 82 +#, sh-format +msgid "Check the result and press Enter to continue" +msgstr "" +# +#. ########################################################## +#. # Usage text +# File: zmktbl, line: 68 +# File: select-tarball, line: 5 +# File: select-device, line: 8 +# File: obi, line: 10 +# File: mktbl, line: 18 +# File: dltbl, line: 13 +# File: confirm-partition, line: 87 +#, sh-format +msgid "Usage" +msgstr "" +# +# File: zmktbl, line: 71 +# File: mktbl, line: 21 +#, sh-format +msgid "to make a tarball of the files" +msgstr "" +# +# File: zmktbl, line: 74 +# File: mktbl, line: 24 +#, sh-format +msgid "Partition to be used:" +msgstr "" +# +# File: zmktbl, line: 76 +# File: mktbl, line: 26 +#, sh-format +msgid "" +"You may need to remove some existing tarballs,\\n'*.tar.gz' and '*.tar.xz' " +"from the tarballs directory\\nto make space for the new tarball" +msgstr "" +# +# File: zmktbl, line: 77 +# File: mktbl, line: 27 +#, sh-format +msgid "These main commands are prepared:" +msgstr "" +# +# File: zmktbl, line: 79 +#, sh-format +msgid "" +"Do you want to use -9e compression for the XZ?\\nThis will make the tarball " +"significantly smaller, but will take MUCH longer to compress." +msgstr "" +# +#. ########################################################## +# File: user-config, line: 21 +#, sh-format +msgid "Please Contact the Distro maintainer" +msgstr "" +# +# File: user-config, line: 22 +#, sh-format +msgid "Removed old user named" +msgstr "" +# +# File: user-config, line: 23 +#, sh-format +msgid "Removed old group named" +msgstr "" +# +# File: user-config, line: 24 +#, sh-format +msgid "Removing" +msgstr "" +# +# File: user-config, line: 25 +#, sh-format +msgid "Enter your new user's name" +msgstr "" +# +# File: user-config, line: 26 +#, sh-format +msgid "Added" +msgstr "" +# +# File: user-config, line: 27 +#, sh-format +msgid "Create Password" +msgstr "" +# +# File: user-config, line: 28 +#, sh-format +msgid "Create password" +msgstr "" +# +# File: user-config, line: 29 +#, sh-format +msgid "Submit" +msgstr "" +# +#. # Arrod DOWN and TAB are keyboard keys +# File: user-config, line: 31 +#, sh-format +msgid "Arrow DOWN for 'Repeat password', TAB for 'Submit'" +msgstr "" +# +# File: user-config, line: 32 +#, sh-format +msgid "Create new password" +msgstr "" +# +# File: user-config, line: 33 +#, sh-format +msgid "Repeat the password" +msgstr "" +# +#. # number 6 +# File: user-config, line: 35 +#, sh-format +msgid "too short password, use at least 6 characters" +msgstr "" +# +# File: user-config, line: 36 +#, sh-format +msgid "the password entries match, go ahead ..." +msgstr "" +# +# File: user-config, line: 37 +#, sh-format +msgid "SPACES NOT ALLOWED IN PASSWORDS! Try again, please!" +msgstr "" +# +# File: user-config, line: 38 +#, sh-format +msgid "the passwords do not match, try again" +msgstr "" +# +# File: user-config, line: 39 +#, sh-format +msgid "Groups:" +msgstr "" +# +# File: user-config, line: 40 +#, sh-format +msgid "Auto Login" +msgstr "" +# +# File: user-config, line: 41 +#, sh-format +msgid "Do you want to log your user in automatically?" +msgstr "" +# +# File: user-config, line: 42 +#, sh-format +msgid "Autologin for" +msgstr "" +# +# File: user-config, line: 43 +#, sh-format +msgid "No autologin for" +msgstr "" +# +# File: user-config, line: 44 +#, sh-format +msgid "Computer supports PAE" +msgstr "" +# +#. # PLEASE LEAVE \n this is a NEW LINE character to put the second sentence on a new line +#. # PAE is an acronym please leave it as is +# File: user-config, line: 47 +#, sh-format +msgid "" +"Do you want to install the PAE kernel now?\\n\n" +"If you are UNSURE you can always do this later, it is not needed." +msgstr "" +# +# File: user-config, line: 49 +#, sh-format +msgid "Yes install PAE chosen." +msgstr "" +# +# File: user-config, line: 50 +#, sh-format +msgid "set password for" +msgstr "" +# +# File: user-config, line: 51 +#, sh-format +msgid "No install PAE chosen." +msgstr "" +# +#. # CPU is an acronym you can translate it, this is the Central Processing Unit.. or 'Processor' +#. # flag in this case is a marker set by the processor internally, this is not a flag on a pole. +# File: user-config, line: 54 +#, sh-format +msgid "CPU has no PAE flag" +msgstr "" +# +#. # 64bit is a type of processor architecture +# File: user-config, line: 56 +#, sh-format +msgid "64bit processor" +msgstr "" +# +# File: user-config, line: 57 +#, sh-format +msgid "You might want to consider using a 64bit operating system" +msgstr "" +# +# File: user-config, line: 59 +#, sh-format +msgid "CPU is not 64bit" +msgstr "" +# +#. # xdg-dirs and gtk-dirs are programs... leave the names as is please +# File: user-config, line: 61 +#, sh-format +msgid "updated menus, and xdg-dirs and gtk-dirs" +msgstr "" +# +#. # XDG and GTK do not need to be translated +#. # xdg-user-dirs-gtk-update is a program +# File: user-config, line: 64 +#, sh-format +msgid "" +"Updated menus, and XDG directories but not GTK directories.. xdg-user-dirs-" +"gtk-update is not installed" +msgstr "" +# +# File: user-config, line: 65 +# File: starter, line: 78 +# File: select-part1, line: 20 +# File: obi-functions, line: 18 +# File: functions, line: 16 +#, sh-format +msgid "WARNING" +msgstr "" +# +#. # lightdm is a program. +#. # tarball is a compressed file format +# File: user-config, line: 68 +#, sh-format +msgid "LightDm is not installed on the tarball. This may be a software bug." +msgstr "" +# +# File: user-config, line: 69 +#, sh-format +msgid "Set system-wide time to" +msgstr "" +# +# File: user-config, line: 70 +#, sh-format +msgid "Set user's time to" +msgstr "" +# +#. # dpkg-reconfigure is a program +# File: user-config, line: 74 +#, sh-format +msgid "dpkg-reconfigure not installed on system (tarball)" +msgstr "" +# +# File: user-config, line: 75 +#, sh-format +msgid "updatedb OR updatedb.mlocate not located on tarball" +msgstr "" +# +#. # chown is a program +# File: user-config, line: 77 +#, sh-format +msgid "chown recursivley" +msgstr "" +# +#. # gksu and sudo are programs for giving a user administrator's rights +# File: user-config, line: 79 +#, sh-format +msgid "changed gksu to sudo mode for" +msgstr "" +# +# File: user-config, line: 80 +#, sh-format +msgid "Configure Timezone" +msgstr "" +# +# File: user-config, line: 81 +#, sh-format +msgid "Configure Keyboard" +msgstr "" +# +# File: user-config, line: 82 +#, sh-format +msgid "Updating:" +msgstr "" +# +#. ########################################################## +# File: user-config, line: 83 +# File: starter, line: 26 +# File: select-tarball, line: 14 +# File: select-part2, line: 22 +# File: select-part2, line: 26 +# File: select-part1, line: 24 +# File: select-part1, line: 29 +# File: partition-help, line: 40 +# File: obi-functions, line: 76 +# File: obi, line: 15 +# File: mkp, line: 20 +# File: hw-progress, line: 7 +# File: functions, line: 74 +# File: dltbl, line: 19 +# File: confirm-partition, line: 20 +#, sh-format +msgid "One Button Installer" +msgstr "" +# +# File: user-config, line: 84 +#, sh-format +msgid "Installing PAE Kernel" +msgstr "" +# +# File: user-config, line: 85 +#, sh-format +msgid "64bit OS doesn't require PAE installation" +msgstr "" +# +# File: user-config, line: 86 +#, sh-format +msgid "Updating the System" +msgstr "" +# +# File: user-config, line: 87 +#, sh-format +msgid "Check for post-release Updates to the System?" +msgstr "" +# +# File: user-config, line: 88 +#, sh-format +msgid "" +"Please Note, this operation could take a long time depending on your " +"internet connection, and hardware." +msgstr "" +# +#. ########################################################## +# File: text-mode-menu, line: 33 +#, sh-format +msgid "PAE flag detected" +msgstr "" +# +# File: text-mode-menu, line: 34 +#, sh-format +msgid "No PAE flag found" +msgstr "" +# +#. # hotkey for "Installer Mode:" +#. # hotkey pair with "Overview" +# File: text-mode-menu, line: 36 +# File: starter, line: 46 +# File: confirm-partition, line: 58 +#, sh-format +msgid "o" +msgstr "" +# +#. # hotkey for "Reboot" +#. # hotkey pair with "Root partition - select or change" +# File: text-mode-menu, line: 37 +# File: starter, line: 56 +# File: confirm-partition, line: 64 +#, sh-format +msgid "r" +msgstr "" +# +#. # Hotkey for: "General File selector" +#. # hotkey pair with "Go ahead - confirm the choice" +# File: text-mode-menu, line: 38 +# File: obi-functions, line: 54 +# File: functions, line: 52 +# File: confirm-partition, line: 44 +#, sh-format +msgid "g" +msgstr "" +# +#. # hotkey for "Poweroff" +# File: text-mode-menu, line: 39 +# File: starter, line: 58 +# File: confirm-partition, line: 92 +#, sh-format +msgid "p" +msgstr "" +# +# File: text-mode-menu, line: 41 +#, sh-format +msgid "One Button Installer text mode Menu" +msgstr "" +# +# File: text-mode-menu, line: 42 +#, sh-format +msgid "Please select an alternative with a letter key or the arrow keys" +msgstr "" +# +# File: text-mode-menu, line: 43 +#, sh-format +msgid "Graphics mode with Gparted and One Button Installer" +msgstr "" +# +# File: text-mode-menu, line: 44 +#, sh-format +msgid "One Button Installer in text mode (if very low RAM)" +msgstr "" +# +# File: text-mode-menu, line: 45 +#, sh-format +msgid "Quit from this menu (exit to the bash shell)" +msgstr "" +# +# File: text-mode-menu, line: 46 +# File: starter, line: 69 +#, sh-format +msgid "Reboot" +msgstr "" +# +# File: text-mode-menu, line: 47 +#, sh-format +msgid "Poweroff" +msgstr "" +# +# File: text-mode-menu, line: 48 +#, sh-format +msgid "Total RAM" +msgstr "" +# +# File: text-mode-menu, line: 49 +#, sh-format +msgid "Used RAM" +msgstr "" +# +# File: text-mode-menu, line: 50 +#, sh-format +msgid "text not found. Change directory!" +msgstr "" +# +# File: text-mode-menu, line: 51 +#, sh-format +msgid "It seems you are running inside a graphical environment already" +msgstr "" +# +#. ########################################################## +# File: starter, line: 21 +# File: mkctrl, line: 8 +#, sh-format +msgid "Tarball path" +msgstr "" +# +# File: starter, line: 22 +#, sh-format +msgid "OBI text not found. Change directory" +msgstr "" +# +# File: starter, line: 23 +#, sh-format +msgid "Exit to the Shell" +msgstr "" +# +# File: starter, line: 24 +#, sh-format +msgid "Close Window" +msgstr "" +# +# File: starter, line: 25 +#, sh-format +msgid "to make the tarballs" +msgstr "" +# +# File: starter, line: 27 +# File: obi-functions, line: 11 +# File: functions, line: 9 +#, sh-format +msgid "OK" +msgstr "" +# +# File: starter, line: 28 +#, sh-format +msgid "OS to install" +msgstr "" +# +# File: starter, line: 29 +#, sh-format +msgid "Unlabeled OS to install" +msgstr "" +# +# File: starter, line: 30 +#, sh-format +msgid "No tarball selected" +msgstr "" +# +# File: starter, line: 31 +#, sh-format +msgid "Had to find a tarball.. OBI found" +msgstr "" +# +# File: starter, line: 32 +#, sh-format +msgid "Starter Menu" +msgstr "" +# +# File: starter, line: 33 +# File: obi-functions, line: 45 +# File: functions, line: 43 +# File: confirm-partition, line: 49 +#, sh-format +msgid "Please select an action with a letter key or the arrow keys" +msgstr "" +# +#. # hotkey for "Partition drives and \Z1Install alongside current OS\Zn" 'used alongside for the a' +#. # Hotkey for: "all files suitable as source files" +#. # hotkey pair with "Autoselect - select root and swap partitions automatically" +# File: starter, line: 38 +# File: obi-functions, line: 58 +# File: functions, line: 56 +# File: confirm-partition, line: 61 +#, sh-format +msgid "a" +msgstr "" +# +#. # hotkey for "Install" +#. # ISO is a file format for CD images +#. # Hotkey for: "only ISO files" +# File: starter, line: 40 +# File: obi-functions, line: 62 +# File: functions, line: 60 +#, sh-format +msgid "i" +msgstr "" +# +#. # hotkey for "Download Tarball" +# File: starter, line: 42 +#, sh-format +msgid "d" +msgstr "" +# +#. # hotkey for "Make Tarball" +#. # Hotkey for: "only image files (with and without compression)" +# File: starter, line: 44 +# File: obi-functions, line: 65 +# File: functions, line: 63 +#, sh-format +msgid "m" +msgstr "" +# +#. # hotkey for "Help to select drive" +#. # hotkey pair with 'Create a separate /home partition', OR 'Change /home partition' +# File: starter, line: 48 +# File: confirm-partition, line: 72 +#, sh-format +msgid "h" +msgstr "" +# +# File: starter, line: 59 +# File: confirm-partition, line: 70 +#, sh-format +msgid "Tips (use arrow keys to scroll)" +msgstr "" +# +# File: starter, line: 60 +#, sh-format +msgid "Select tarball to install" +msgstr "" +# +#. # please leave \Z1 and \Zn these make the text bold +# File: starter, line: 62 +#, sh-format +msgid "Partition drives and \\Z1Install alongside current OS\\Zn" +msgstr "" +# +# File: starter, line: 63 +#, sh-format +msgid "Download Tarball" +msgstr "" +# +# File: starter, line: 64 +#, sh-format +msgid "Make Tarball" +msgstr "" +# +# File: starter, line: 65 +#, sh-format +msgid "Help to select drive" +msgstr "" +# +# File: starter, line: 66 +#, sh-format +msgid "Tips" +msgstr "" +# +# File: starter, line: 67 +#, sh-format +msgid "Check (and repair) the file system" +msgstr "" +# +# File: starter, line: 68 +#, sh-format +msgid "Quit from this menu" +msgstr "" +# +# File: starter, line: 70 +#, sh-format +msgid "Power Off" +msgstr "" +# +# File: starter, line: 71 +# File: confirm-partition, line: 95 +#, sh-format +msgid "Install" +msgstr "" +# +#. # SPLASH SCREEN TEXT +# File: starter, line: 73 +#, sh-format +msgid "Welcome and Warning" +msgstr "" +# +# File: starter, line: 74 +#, sh-format +msgid "Welcome" +msgstr "" +# +#. # These Lines until END will be a paragraph, modify them as you need to +#. # please leave \Z1 and \Zn these make the text bold so make 'risky' BOLD +# File: starter, line: 77 +#, sh-format +msgid "Installing an operating system is a \\Z1risky\\Zn operation." +msgstr "" +# +#. # please leave \Z1 and \Zn these make the text bold +# File: starter, line: 80 +#, sh-format +msgid "\\Z1Copy the data you want to keep to another device\\Zn, for example:" +msgstr "" +# +# File: starter, line: 81 +#, sh-format +msgid "an external hard disk drive or a cloud service! Otherwise," +msgstr "" +# +# File: starter, line: 82 +#, sh-format +msgid "there might be no easy way to recover any previous data." +msgstr "" +# +# File: starter, line: 83 +#, sh-format +msgid "Expensive intelligence services might restore some data." +msgstr "" +# +# File: starter, line: 84 +#, sh-format +msgid "If you use the BASIC installer the target device will be" +msgstr "" +# +# File: starter, line: 85 +#, sh-format +msgid "COMPLETELY OVERWRITTEN" +msgstr "" +# +# File: starter, line: 86 +#, sh-format +msgid "If you want to keep an installed operating system," +msgstr "" +# +#. # The line after this is the same as: Partition drives and \Z1Install alongside current OS\Zn +#. # this line is the END +# File: starter, line: 89 +#, sh-format +msgid "make sure to use the option" +msgstr "" +# +#. # Splash as in 'Splash Screen' +# File: starter, line: 91 +#, sh-format +msgid "Splash" +msgstr "" +# +# File: starter, line: 92 +#, sh-format +msgid "Is this a tarball you want to use:" +msgstr "" +# +# File: starter, line: 93 +#, sh-format +msgid "Installer Mode:" +msgstr "" +# +# File: starter, line: 94 +# File: setlevel, line: 7 +#, sh-format +msgid "basic" +msgstr "" +# +# File: starter, line: 95 +# File: setlevel, line: 8 +#, sh-format +msgid "advanced" +msgstr "" +# +# File: starter, line: 96 +# File: obi-functions, line: 73 +# File: functions, line: 71 +# File: dltbl, line: 36 +# File: confirm-partition, line: 94 +#, sh-format +msgid "Hotkey" +msgstr "" +# +#. ############################### +# File: setlevel, line: 5 +#, sh-format +msgid "Select basic or advanced OBI level" +msgstr "" +# +# File: setlevel, line: 6 +#, sh-format +msgid "The WHOLE device is ERASED and used" +msgstr "" +# +# File: setlevel, line: 9 +#, sh-format +msgid "Prepare partitions with Gparted for the advanced method" +msgstr "" +# +# File: setlevel, line: 10 +#, sh-format +msgid "Partitions are selected and used" +msgstr "" +# +# File: setlevel, line: 11 +#, sh-format +msgid "Select OBI level" +msgstr "" +# +# File: select-tarball, line: 6 +#, sh-format +msgid "Select tarball" +msgstr "" +# +# File: select-tarball, line: 7 +#, sh-format +msgid "avoid spaces in tarball names" +msgstr "" +# +#. # \n is a newline character please leave to separate lines +# File: select-tarball, line: 9 +# File: dltbl, line: 21 +#, sh-format +msgid "Please select a tarball with the arrow keys, scroll if necessary" +msgstr "" +# +# File: select-tarball, line: 10 +#, sh-format +msgid "Quit, no tarball selected" +msgstr "" +# +# File: select-tarball, line: 13 +# File: dltbl, line: 22 +#, sh-format +msgid "Available tarballs" +msgstr "" +# +# File: select-tarball, line: 15 +#, sh-format +msgid "Select tarball to use with the One Button Installer" +msgstr "" +# +# File: select-tarball, line: 16 +#, sh-format +msgid "Tarball selector (easy)" +msgstr "" +# +# File: select-tarball, line: 17 +#, sh-format +msgid "General File selector (difficult)" +msgstr "" +# +#. # \n is a newline character please leave to separate lines +# File: select-tarball, line: 19 +#, sh-format +msgid "" +"Select tarballs in standard directory (easy), or\\n\n" +"anywhere with the general file selector (difficult)?" +msgstr "" +# +# File: select-tarball, line: 21 +#, sh-format +msgid "Zero sized tarball found:" +msgstr "" +# +# File: select-tarball, line: 22 +#, sh-format +msgid "Remove it? (y/n)" +msgstr "" +# +#. # SPACE BAR and SLASH are keyboard keys +# File: select-tarball, line: 24 +#, sh-format +msgid "" +"SPACE BAR: copy selection to text-entry window, SLASH: show directory content" +msgstr "" +# +# File: select-tarball, line: 25 +#, sh-format +msgid "No tarball found (tarballs/filename.tar.gz)" +msgstr "" +# +#. ############################### +# File: select-part2, line: 14 +#, sh-format +msgid "This device mounted and cannot be unmounted:" +msgstr "" +# +# File: select-part2, line: 15 +#, sh-format +msgid "You must stop the program locking it " +msgstr "" +# +# File: select-part2, line: 16 +#, sh-format +msgid "Select partition using this key:" +msgstr "" +# +# File: select-part2, line: 17 +#, sh-format +msgid "Partition:" +msgstr "" +# +# File: select-part2, line: 18 +#, sh-format +msgid "Select Partition:" +msgstr "" +# +#. ##################################################### +# File: select-part2, line: 20 +# File: select-part1, line: 19 +#, sh-format +msgid "Usage:" +msgstr "" +# +# File: select-part2, line: 21 +#, sh-format +msgid "Select partition for the advanced Installer level" +msgstr "" +# +# File: select-part2, line: 23 +#, sh-format +msgid "Examples:" +msgstr "" +# +# File: select-part2, line: 24 +#, sh-format +msgid "scroll if necessary " +msgstr "" +# +# File: select-part2, line: 25 +#, sh-format +msgid "You must select a root partition" +msgstr "" +# +# File: select-part2, line: 27 +#, sh-format +msgid "NAME" +msgstr "" +# +# File: select-part2, line: 28 +#, sh-format +msgid "SIZE" +msgstr "" +# +# File: select-part2, line: 30 +#, sh-format +msgid "FSTYPE" +msgstr "" +# +# File: select-part2, line: 31 +#, sh-format +msgid "LABEL" +msgstr "" +# +# File: select-part2, line: 32 +#, sh-format +msgid "MOUNTPOINT" +msgstr "" +# +#. #paired with No_swap +# File: select-part2, line: 34 +#, sh-format +msgid "n" +msgstr "" +# +#. #please do not put spaces in this!!! +# File: select-part2, line: 36 +#, sh-format +msgid "No_swap" +msgstr "" +# +# File: select-part1, line: 21 +#, sh-format +msgid "the partitions will be completely overwritten" +msgstr "" +# +# File: select-part1, line: 22 +#, sh-format +msgid "Get more help to select device at the Starter menu" +msgstr "" +# +# File: select-part1, line: 23 +#, sh-format +msgid "Unmount the target partitions if mounted" +msgstr "" +# +# File: select-part1, line: 25 +#, sh-format +msgid "Select partition" +msgstr "" +# +# File: select-part1, line: 26 +# File: select-device, line: 9 +#, sh-format +msgid "Install:" +msgstr "" +# +#. # \n is a newline character please leave to separate lines +# File: select-part1, line: 27 +# File: select-device, line: 13 +#, sh-format +msgid "" +"Install to a mass storage device, typically an\\ninternal hard disk drive or " +"external USB or eSATA drive" +msgstr "" +# +# File: select-device, line: 10 +#, sh-format +msgid "Installing:" +msgstr "" +# +# File: select-device, line: 11 +#, sh-format +msgid "Target:" +msgstr "" +# +# File: select-device, line: 14 +# File: obi-functions, line: 13 +# File: functions, line: 11 +#, sh-format +msgid "Select device" +msgstr "" +# +# File: select-device, line: 15 +#, sh-format +msgid "Do you want to install:" +msgstr "" +# +# File: select-device, line: 18 +#, sh-format +msgid "Check the result" +msgstr "" +# +# File: select-device, line: 19 +#, sh-format +msgid "Choose the drive to install to:" +msgstr "" +# +#. ########################################################## +#. # \n is a new line character please leave alone +# File: partition-help, line: 15 +#, sh-format +msgid "Error finding the OBI path.\\nEXITING IMMEDIATELY" +msgstr "" +# +# File: partition-help, line: 16 +#, sh-format +msgid "" +"You can install a system from a tarball into two partitions:\\n\\n one root " +"file system partition and one swap partition. This way it is possible to " +"create a *dual boot* device with an existing (already installed) operating " +"system. It is also possible to create a separate\\n*data partition*, that " +"can be used by linux as well as Windows. (Must be FAT32, FAT16, or NTFS) OSX " +"uses HFS and HFS+, though FAT32 will work well with both OSX and Linux. " +"NTFS is usable by OSX through 3rd party apps.\\n\\n" +msgstr "" +# +# File: partition-help, line: 17 +#, sh-format +msgid "OBI detects" +msgstr "" +# +# File: partition-help, line: 18 +#, sh-format +msgid "device" +msgstr "" +# +# File: partition-help, line: 19 +#, sh-format +msgid "devices" +msgstr "" +# +# File: partition-help, line: 20 +#, sh-format +msgid "" +"NOTE: If you do not wish to hibernate/suspend you can use 1G (or less) for " +"your Swap" +msgstr "" +# +#. # please leave ${redtext} ${greentext} ${resetvid} in place +# File: partition-help, line: 22 +#, sh-format +msgid "Edit and create partitions" +msgstr "" +# +#. # this is used in a tabbed chart to show the disk drive device name and size \t is the TAB character leave it alone please +# File: partition-help, line: 26 +#, sh-format +msgid "For example: \\n The drive \\t Size" +msgstr "" +# +# File: partition-help, line: 28 +#, sh-format +msgid "You have existing SWAP partition(s) here:" +msgstr "" +# +# File: partition-help, line: 29 +#, sh-format +msgid "" +"NOTE, if you want to hibernate your SWAP should be somewhat larger than your " +"RAM" +msgstr "" +# +# File: partition-help, line: 30 +#, sh-format +msgid "Help to partition" +msgstr "" +# +# File: partition-help, line: 31 +#, sh-format +msgid "" +"No Root partition made with the label obi-root\\nDo you want to try again?" +msgstr "" +# +# File: partition-help, line: 32 +#, sh-format +msgid "Use Gparted and prepare the device for the installer in the next step" +msgstr "" +# +#. # please leave obi-root as is +# File: partition-help, line: 35 +#, sh-format +msgid "1. Put the label obi-root to one partition and format it to FAT32" +msgstr "" +# +#. # please leave obi-swap in this as is +# File: partition-help, line: 37 +#, sh-format +msgid "2. Put the label obi-swap to one partition and format it to FAT32" +msgstr "" +# +# File: partition-help, line: 38 +#, sh-format +msgid "(It is fast to format to FAT32, and it will be overwritten by the OBI)" +msgstr "" +# +# File: partition-help, line: 39 +#, sh-format +msgid "*. The other partitions 'can be anything else'" +msgstr "" +# +#. ########################################################## +# File: obi-readme, line: 8 +#, sh-format +msgid "Help" +msgstr "" +# +# File: obi-readme, line: 10 +#, sh-format +msgid "Quick Start Guide" +msgstr "" +# +# File: obi-readme, line: 11 +#, sh-format +msgid "Detailed Help" +msgstr "" +# +# File: obi-readme, line: 12 +#, sh-format +msgid "About OBI" +msgstr "" +# +# File: obi-readme, line: 13 +#, sh-format +msgid "Learn more about the One Button Installer" +msgstr "" +# +#. ########################################################## +# File: obi-functions, line: 8 +# File: mktbl, line: 29 +#, sh-format +msgid "Press Enter to continue" +msgstr "" +# +# File: obi-functions, line: 9 +#, sh-format +msgid "Error finding the tarball path so it was made at" +msgstr "" +# +#. ########################################################## +# File: obi-functions, line: 10 +# File: functions, line: 8 +#, sh-format +msgid "Help info to select drive" +msgstr "" +# +# File: obi-functions, line: 12 +# File: functions, line: 10 +#, sh-format +msgid "Use Arrow PgUp PgDn Home End keys to scroll this help info" +msgstr "" +# +# File: obi-functions, line: 14 +# File: functions, line: 12 +#, sh-format +msgid "warning and overview" +msgstr "" +# +#. # please leave \n and \Zn and \Z1 \n is a new line, \Z1 and \Zn make text BOLD +# File: obi-functions, line: 16 +# File: functions, line: 14 +#, sh-format +msgid "You NEED to choose a device for the bootloader" +msgstr "" +# +# File: obi-functions, line: 17 +# File: functions, line: 15 +#, sh-format +msgid "" +": the device will be completely overwritten\\Zn\\nGet more help to select " +"device at the Starter menu\\n\\Z1Unmount the target device if mounted" +msgstr "" +# +#. # HotKey for: "toggle USB-only" +# File: obi-functions, line: 20 +# File: functions, line: 18 +#, sh-format +msgid "u" +msgstr "" +# +# File: obi-functions, line: 21 +# File: functions, line: 19 +#, sh-format +msgid "toggle USB-only" +msgstr "" +# +# File: obi-functions, line: 22 +# File: functions, line: 20 +#, sh-format +msgid "show all drives" +msgstr "" +# +# File: obi-functions, line: 23 +# File: functions, line: 21 +#, sh-format +msgid "hide other drives" +msgstr "" +# +# File: obi-functions, line: 24 +# File: functions, line: 22 +#, sh-format +msgid "quit installing" +msgstr "" +# +# File: obi-functions, line: 25 +# File: functions, line: 23 +#, sh-format +msgid "and continue" +msgstr "" +# +# File: obi-functions, line: 26 +# File: functions, line: 24 +#, sh-format +msgid "Please select a device with the arrow keys, scroll if necessary" +msgstr "" +# +# File: obi-functions, line: 27 +# File: functions, line: 25 +#, sh-format +msgid "Go" +msgstr "" +# +# File: obi-functions, line: 31 +# File: functions, line: 29 +#, sh-format +msgid "wiping" +msgstr "" +# +#. # please leave \n this is a new line character +# File: obi-functions, line: 33 +# File: functions, line: 31 +#, sh-format +msgid "installing\\n\\nthe operating system" +msgstr "" +# +# File: obi-functions, line: 34 +# File: functions, line: 32 +#, sh-format +msgid "FINAL WARNING" +msgstr "" +# +# File: obi-functions, line: 35 +# File: functions, line: 33 +#, sh-format +msgid "" +"before wiping and installing !!!\\nDo you really want to wipe and install to " +"this device?" +msgstr "" +# +#. #SPACEBAR and SLASH are keyboard keys +# File: obi-functions, line: 37 +# File: functions, line: 35 +#, sh-format +msgid "" +"SPACEBAR: copy selection to text-entry box, SLASH: show directory content" +msgstr "" +# +# File: obi-functions, line: 38 +# File: functions, line: 36 +#, sh-format +msgid "Select source file" +msgstr "" +# +# File: obi-functions, line: 39 +# File: functions, line: 37 +#, sh-format +msgid "normal, file type filter" +msgstr "" +# +# File: obi-functions, line: 40 +# File: functions, line: 38 +#, sh-format +msgid "Find and select among iso and image files, or with a general selector." +msgstr "" +# +#. # please leave \n and \Zn and \Z1 \n is a new line, \Z1 and \Zn make text BOLD +# File: obi-functions, line: 42 +# File: functions, line: 40 +#, sh-format +msgid "" +"Increase the size of the terminal window, particularly the width!\\Zn\\nThen " +"the menus to 'select file' work better to show long file names.\\n\\n" +"\\Z1Avoid spaces and special characters in directory and file names!" +msgstr "" +# +#. # please leave \n and \Zn and \Z1 \n is a new line, \Z1 and \Zn make text BOLD +# File: obi-functions, line: 44 +# File: functions, line: 42 +#, sh-format +msgid "" +"Avoid spaces and special characters in directory and file names!\\Zn\\nUse a " +"high resolution screen, if possible more than 80 characters wide!\\nThen the " +"menus to 'select file' work better to show long file names.\\n\\n\\Z1Type " +"text in the bottom text box!\\Zn Use the upper text box(es) only to\\npaste " +"text into the bottom window (with the space key). The slash key\\ncan be " +"used to 'finish' moving to another directory." +msgstr "" +# +# File: obi-functions, line: 46 +# File: functions, line: 44 +#, sh-format +msgid "iso and image file selector (easy), no search for linked files" +msgstr "" +# +# File: obi-functions, line: 49 +# File: functions, line: 47 +#, sh-format +msgid "iso and image file selector (easy), include Linked files (may fail)" +msgstr "" +# +#. # Hotkey for: "iso and image file selector (easy), include Linked files (may fail)" +# File: obi-functions, line: 51 +# File: functions, line: 49 +#, sh-format +msgid "l" +msgstr "" +# +# File: obi-functions, line: 52 +# File: functions, line: 50 +#, sh-format +msgid "General File selector" +msgstr "" +# +# File: obi-functions, line: 55 +# File: functions, line: 53 +#, sh-format +msgid "" +"Among files in the previously selected directory tree,\\nselect file type to " +"display" +msgstr "" +# +# File: obi-functions, line: 56 +# File: functions, line: 54 +#, sh-format +msgid "Select file type to display" +msgstr "" +# +# File: obi-functions, line: 59 +# File: functions, line: 57 +#, sh-format +msgid "all files suitable as source files" +msgstr "" +# +# File: obi-functions, line: 63 +# File: functions, line: 61 +#, sh-format +msgid "only ISO files" +msgstr "" +# +# File: obi-functions, line: 66 +# File: functions, line: 64 +#, sh-format +msgid "only image files (with and without compression)" +msgstr "" +# +# File: obi-functions, line: 67 +# File: functions, line: 65 +#, sh-format +msgid "Do you want to install it?" +msgstr "" +# +# File: obi-functions, line: 68 +# File: functions, line: 66 +#, sh-format +msgid "The program 'pv' can show the progress during the installation." +msgstr "" +# +# File: obi-functions, line: 69 +# File: functions, line: 67 +#, sh-format +msgid "Prepare by making the system up to date" +msgstr "" +# +# File: obi-functions, line: 70 +# File: functions, line: 68 +#, sh-format +msgid "however, it is not installed." +msgstr "" +# +# File: obi-functions, line: 71 +# File: functions, line: 69 +#, sh-format +msgid "Booted from" +msgstr "" +# +# File: obi-functions, line: 72 +# File: functions, line: 70 +#, sh-format +msgid "Available devices" +msgstr "" +# +# File: obi-functions, line: 74 +# File: functions, line: 72 +#, sh-format +msgid "The target device will be:" +msgstr "" +# +# File: obi-functions, line: 75 +# File: functions, line: 73 +#, sh-format +msgid "Target Device:" +msgstr "" +# +# File: obi-functions, line: 77 +# File: functions, line: 75 +# File: confirm-partition, line: 91 +#, sh-format +msgid "Click this if you are ready to go" +msgstr "" +# +# File: obi-functions, line: 78 +# File: functions, line: 76 +#, sh-format +msgid "Error finding the OBI selected path" +msgstr "" +# +# File: obi-functions, line: 79 +# File: functions, line: 77 +#, sh-format +msgid "Script not found. Change directory" +msgstr "" +# +#. ########################################################## +# File: obi, line: 8 +#, sh-format +msgid "Run this as ROOT" +msgstr "" +# +# File: obi, line: 9 +#, sh-format +msgid "Install operating system with the One Button Installer" +msgstr "" +# +# File: obi, line: 11 +#, sh-format +msgid "Selected Tarball" +msgstr "" +# +# File: obi, line: 12 +#, sh-format +msgid "selecting" +msgstr "" +# +# File: obi, line: 13 +# File: confirm-partition, line: 84 +#, sh-format +msgid "with swap" +msgstr "" +# +# File: obi, line: 14 +#, sh-format +msgid "without swap" +msgstr "" +# +# File: obi, line: 16 +#, sh-format +msgid "Progress" +msgstr "" +# +#. ########################################################## +#. please leave zMktbl as is, also \n is the newline character +# File: mktbl, line: 16 +# File: dltbl, line: 18 +#, sh-format +msgid "Remove some old tarball(s) only if necessary" +msgstr "" +# +# File: mktbl, line: 28 +#, sh-format +msgid "Do you want to continue?" +msgstr "" +# +# File: mktbl, line: 30 +#, sh-format +msgid "Default" +msgstr "" +# +# File: mktbl, line: 31 +#, sh-format +msgid "compression" +msgstr "" +# +# File: mktbl, line: 32 +#, sh-format +msgid "filename" +msgstr "" +# +# File: mktbl, line: 33 +#, sh-format +msgid "source partition" +msgstr "" +# +# File: mktbl, line: 34 +#, sh-format +msgid "destination" +msgstr "" +# +# File: mktbl, line: 35 +#, sh-format +msgid "Example" +msgstr "" +# +# File: mktbl, line: 36 +#, sh-format +msgid "The file extension tar.xz or tar.gz is added automatically" +msgstr "" +# +# File: mktbl, line: 37 +#, sh-format +msgid "Run from bash if not default" +msgstr "" +# +# File: mktbl, line: 38 +#, sh-format +msgid "" +"The default is xz compression because it is often 20% or more\\nefficient " +"(smaller files) compared to gzip for gz files." +msgstr "" +# +# File: mktbl, line: 39 +#, sh-format +msgid "tarball finished, syncing now ..." +msgstr "" +# +#. ########################################################## +# File: mkpxpy, line: 8 +# File: mkp2p1, line: 9 +# File: mkp1, line: 9 +# File: mkp, line: 22 +#, sh-format +msgid "mount of what should become the root partition failed" +msgstr "" +# +# File: mkpxpy, line: 9 +# File: mkp, line: 23 +#, sh-format +msgid "Use existing swap partition" +msgstr "" +# +# File: mkpxpy, line: 10 +# File: mkp, line: 24 +#, sh-format +msgid "keep its UUID" +msgstr "" +# +# File: mkpxpy, line: 11 +# File: mkp, line: 25 +#, sh-format +msgid "Make a swap partition" +msgstr "" +# +# File: mkpxpy, line: 12 +# File: mkp, line: 26 +#, sh-format +msgid "and get new UUID" +msgstr "" +# +#. ########################################################## +# File: mkp, line: 8 +#, sh-format +msgid "Disk is smaller than" +msgstr "" +# +# File: mkp, line: 9 +#, sh-format +msgid "only gzip and xz compression implemented" +msgstr "" +# +# File: mkp, line: 10 +#, sh-format +msgid "(the tarball) is expanded, syncing the drive" +msgstr "" +# +# File: mkp, line: 11 +#, sh-format +msgid "Reboot Now" +msgstr "" +# +# File: mkp, line: 12 +#, sh-format +msgid "Do you want to reboot into" +msgstr "" +# +# File: mkp, line: 13 +#, sh-format +msgid "Not rebooting" +msgstr "" +# +# File: mkp, line: 14 +#, sh-format +msgid "The installation has finished" +msgstr "" +# +# File: mkp, line: 15 +# File: grub-installer, line: 16 +#, sh-format +msgid "Installing Bootloader" +msgstr "" +# +# File: mkp, line: 17 +#, sh-format +msgid "Extracting:" +msgstr "" +# +# File: mkp, line: 18 +#, sh-format +msgid "OBI Log File" +msgstr "" +# +# File: mkp, line: 19 +#, sh-format +msgid "Do you want to check the install Log?" +msgstr "" +# +# File: mkp, line: 21 +#, sh-format +msgid "If unsure choose this device:" +msgstr "" +# +#. ########################################################## +# File: mkhome, line: 5 +#, sh-format +msgid "Home partition is not specified, as obi-home" +msgstr "" +# +# File: mkctrl, line: 9 +#, sh-format +msgid "not found or not a file" +msgstr "" +# +# File: mkctrl, line: 10 +#, sh-format +msgid "Trying with the default tarball" +msgstr "" +# +# File: mkctrl, line: 11 +#, sh-format +msgid "No system name specified, using the name of the tarball" +msgstr "" +# +#. ############################################################################ +# File: locale-lister, line: 37 +#, sh-format +msgid "Select Language" +msgstr "" +# +# File: locale-lister, line: 38 +#, sh-format +msgid "Code" +msgstr "" +# +# File: locale-lister, line: 39 +#, sh-format +msgid "Name" +msgstr "" +# +# File: locale-lister, line: 40 +#, sh-format +msgid "Use this Locale:" +msgstr "" +# +#. ############################################################################ +# File: keyboard-switcher, line: 36 +#, sh-format +msgid "Select Layout" +msgstr "" +# +# File: keyboard-switcher, line: 37 +#, sh-format +msgid "Layout" +msgstr "" +# +# File: keyboard-switcher, line: 38 +#, sh-format +msgid "Description" +msgstr "" +# +# File: keyboard-switcher, line: 39 +#, sh-format +msgid "Use This:" +msgstr "" +# +# File: keyboard-switcher, line: 40 +#, sh-format +msgid "Model" +msgstr "" +# +# File: keyboard-switcher, line: 41 +#, sh-format +msgid "Select Model (if unsure use pc105)" +msgstr "" +# +# File: keyboard-switcher, line: 42 +#, sh-format +msgid "Select Variant (this is optional)" +msgstr "" +# +# File: keyboard-switcher, line: 43 +#, sh-format +msgid "Variant" +msgstr "" +# +# File: keyboard-switcher, line: 44 +#, sh-format +msgid "Do you want to save your choices?" +msgstr "" +# +#. ########################################################## +# File: hw-progress, line: 5 +#, sh-format +msgid "Hardware firmware detector" +msgstr "" +# +# File: hw-progress, line: 6 +#, sh-format +msgid "Please Choose a Directory With Firmware Deb files" +msgstr "" +# +#. ########################################################## +#. # filesystem directory will go left of this so change accordingly if text goes right to left +# File: grub-installer, line: 12 +#, sh-format +msgid "a root file system should be mounted on: " +msgstr "" +# +# File: grub-installer, line: 13 +#, sh-format +msgid "Select drive for bootloader" +msgstr "" +# +#. # GRUB is the bootloader, this dialog shows which device the bootloader updated for +# File: grub-installer, line: 15 +#, sh-format +msgid "Updated GRUB for:" +msgstr "" +# +# File: grub-installer, line: 17 +#, sh-format +msgid "unmounted all chroot bound filesystems" +msgstr "" +# +# File: grub-installer, line: 18 +#, sh-format +msgid "Successfully unmounted chroot" +msgstr "" +# +# File: grub-installer, line: 19 +#, sh-format +msgid "Couldn't successfully unmount chroot" +msgstr "" +# +#. ########################################################## +# File: fix-device, line: 9 +#, sh-format +msgid "Checking device:" +msgstr "" +# +# File: fix-device, line: 10 +#, sh-format +msgid "Fix Device" +msgstr "" +# +#. ########################################################## +# File: findtbl, line: 5 +#, sh-format +msgid "Found Tarball" +msgstr "" +# +#. ########################################################## +#. # please leave dltbl, this is the program name +# File: dltbl, line: 7 +#, sh-format +msgid "dltbl: cannot download tarballs for" +msgstr "" +# +# File: dltbl, line: 8 +#, sh-format +msgid "Cannot find repository automatically for this distro/version" +msgstr "" +# +#. # ~/tarballs is a directory and should remain as is +# File: dltbl, line: 10 +#, sh-format +msgid "Download/check tarballs manually and move them to ~/tarballs" +msgstr "" +# +#. # Enter key on the keyboard +# File: dltbl, line: 12 +#, sh-format +msgid "Press ENTER to continue" +msgstr "" +# +# File: dltbl, line: 14 +#, sh-format +msgid "to download tarballs" +msgstr "" +# +#. # this is a popup to show that there was an error dowloading a file +# File: dltbl, line: 16 +#, sh-format +msgid "Error downloading:" +msgstr "" +# +# File: dltbl, line: 20 +#, sh-format +msgid "Download tarball" +msgstr "" +# +# File: dltbl, line: 26 +#, sh-format +msgid "No tarball downloaded" +msgstr "" +# +# File: dltbl, line: 27 +#, sh-format +msgid "Downloading" +msgstr "" +# +# File: dltbl, line: 28 +#, sh-format +msgid "Checking md5sum" +msgstr "" +# +# File: dltbl, line: 29 +#, sh-format +msgid "Bad md5sum, try to download the tarball again" +msgstr "" +# +#. # Please leave /tarballs as is. \n is a New Line special character and should remain where appropriate +# File: dltbl, line: 31 +#, sh-format +msgid "" +"Could not write to /tarballs, which is normal in a live session.\\n'Select " +"tarball' can still find the tarball automatically." +msgstr "" +# +#. # this means a keyboard shortcut to choose an item +# File: dltbl, line: 34 +#, sh-format +msgid "Ready To Continue" +msgstr "" +# +# File: dltbl, line: 35 +# File: confirm-partition, line: 89 +#, sh-format +msgid "Check the Result" +msgstr "" +# +# File: dltbl, line: 37 +#, sh-format +msgid "Remove" +msgstr "" +# +# File: confirm-partition, line: 21 +#, sh-format +msgid "Confirm partition" +msgstr "" +# +#. #These two lines go together around a variable showing the OS name: +#. # Do you want to install OS_VARIABLE ? +#. # so make appropriate punctuation if possible +# File: confirm-partition, line: 25 +#, sh-format +msgid "Do you want to install" +msgstr "" +# +#. # Enter is the keyboard key +# File: confirm-partition, line: 27 +#, sh-format +msgid "Press Enter to quit (return to the main menu)" +msgstr "" +# +#. # these lines refer to a harddrive being 'mounted' as readable and writable +#. # example: +#. # /dev/sda is mounted +# File: confirm-partition, line: 31 +#, sh-format +msgid "is mounted" +msgstr "" +# +# File: confirm-partition, line: 32 +#, sh-format +msgid "has been unmounted" +msgstr "" +# +# File: confirm-partition, line: 33 +#, sh-format +msgid "was not mounted" +msgstr "" +# +# File: confirm-partition, line: 34 +#, sh-format +msgid "should NOT be mounted." +msgstr "" +# +#. # SWAP is the linux virtual memory space on a harddrive +# File: confirm-partition, line: 36 +#, sh-format +msgid "NO SWAP" +msgstr "" +# +# File: confirm-partition, line: 37 +#, sh-format +msgid "and the swap partition" +msgstr "" +# +#. # the - is a separator mark leave it if it is possible +# File: confirm-partition, line: 41 +#, sh-format +msgid " Swap partition - select or change" +msgstr "" +# +# File: confirm-partition, line: 42 +#, sh-format +msgid "Quit from this menu (return to the starter menu)" +msgstr "" +# +# File: confirm-partition, line: 45 +#, sh-format +msgid "Go ahead - confirm the choice" +msgstr "" +# +#. # This is the root partition to install the operating system +# File: confirm-partition, line: 47 +#, sh-format +msgid "NO ROOT" +msgstr "" +# +# File: confirm-partition, line: 48 +#, sh-format +msgid " Start selecting a Root partition" +msgstr "" +# +# File: confirm-partition, line: 50 +#, sh-format +msgid "The One Button Installer is prepared to start installing" +msgstr "" +# +# File: confirm-partition, line: 54 +#, sh-format +msgid "the operating system" +msgstr "" +# +# File: confirm-partition, line: 55 +#, sh-format +msgid "to the root partition" +msgstr "" +# +# File: confirm-partition, line: 56 +#, sh-format +msgid "Change or confirm the partitions or quit" +msgstr "" +# +# File: confirm-partition, line: 59 +#, sh-format +msgid "Overview" +msgstr "" +# +# File: confirm-partition, line: 62 +#, sh-format +msgid "Autoselect - select root and swap partitions automatically" +msgstr "" +# +# File: confirm-partition, line: 65 +#, sh-format +msgid "Root partition - select or change" +msgstr "" +# +#. #Gparted is a program name. It prepares disk partitions +# File: confirm-partition, line: 69 +#, sh-format +msgid "Tips (How to prepare partitions with Gparted)" +msgstr "" +# +#. # /home is a specific directory on the computer, please leave it in English +# File: confirm-partition, line: 74 +#, sh-format +msgid "Create a separate /home partition" +msgstr "" +# +# File: confirm-partition, line: 75 +#, sh-format +msgid "Change /home partition" +msgstr "" +# +# File: confirm-partition, line: 76 +#, sh-format +msgid "Final WARNING" +msgstr "" +# +#. # leave \\Z1 \\Z7 alone... these make the text more visible in the program Move them if you need to change the wording +# File: confirm-partition, line: 78 +#, sh-format +msgid "\\Z1This is the \\Z7 FINAL WARNING \\Z1 before starting to install !!!" +msgstr "" +# +#. # the \\Zn ends the previous \\Z1 +# File: confirm-partition, line: 80 +#, sh-format +msgid "Do you really want to install and overwrite these partitions?\\Zn" +msgstr "" +# +# File: confirm-partition, line: 83 +#, sh-format +msgid "Installing" +msgstr "" +# +# File: confirm-partition, line: 85 +#, sh-format +msgid "with no swap partition" +msgstr "" +# +# File: confirm-partition, line: 88 +#, sh-format +msgid "" +"to a partition on an internal hard disk drive or external USB or eSATA drive" +msgstr "" +# +# File: confirm-partition, line: 90 +#, sh-format +msgid "Current Install Location:" +msgstr "" +# +# File: confirm-partition, line: 93 +#, sh-format +msgid "Use gparted and show help" +msgstr "" +# +#. # please leave obi-root AND obi-swap in English. Please separate the two lines with \n (the newline character) +# File: confirm-partition, line: 97 +#, sh-format +msgid "" +"No root partition found with obi-root as the label to select automatically." +"\\nNo swap partition found with obi-swap as the label to select " +"automatically." +msgstr "" diff -Nru obi-installer-3.3.0ubuntu0/po/es.po obi-installer-3.4.0ubuntu0/po/es.po --- obi-installer-3.3.0ubuntu0/po/es.po 1970-01-01 00:00:00.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/po/es.po 2018-03-15 13:13:10.000000000 +0000 @@ -0,0 +1,2293 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Nio Wiklund +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-02-08 08:56-0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Israel Dahl \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +# +#. ############################################################################ +# File: zoned-out, line: 36 +#, sh-format +msgid "Time Zone" +msgstr "Zona horaria" +# +# File: zoned-out, line: 37 +#, sh-format +msgid "Select Time Zone" +msgstr "Selecciona la zona horaria" +# +# File: zoned-out, line: 38 +#, sh-format +msgid "Use this Time ZoneUsa esta zona horaria:" +msgstr "" +# +#. ########################################################## +# File: zmktbl-wrapper, line: 5 +#, sh-format +msgid "" +"The zMktbl console displays output from the engine behind the zenity curtain" +msgstr "" +# +# File: zmktbl-wrapper, line: 6 +#, sh-format +msgid "Press Enter to close this zMktbl console window" +msgstr "" +# +# File: zmktbl-wrapper, line: 7 +#, sh-format +msgid "Password" +msgstr "Contraseña" +# +# File: zmktbl-wrapper, line: 8 +#, sh-format +msgid "Console" +msgstr "Consola" +# +#. ########################################################## +# File: zmktbl, line: 23 +#, sh-format +msgid "Text not found. Change directory!" +msgstr "" +# +# File: zmktbl, line: 24 +#, sh-format +msgid "make tarball master menu" +msgstr "" +# +# File: zmktbl, line: 25 +#, sh-format +msgid "Select an action (a line) from the list below or use the current value" +msgstr "" +# +# File: zmktbl, line: 26 +#, sh-format +msgid "Hotkey:" +msgstr "" +# +# File: zmktbl, line: 27 +#, sh-format +msgid "Action: Change ..." +msgstr "" +# +# File: zmktbl, line: 28 +#, sh-format +msgid "Current value" +msgstr "" +# +#. # hotkey for "Select tarball to install" +#. # Hotkey for: "iso and image file selector (easy), no search for linked files" +#. # hotkey pair with " Swap partition - select or change" +# File: zmktbl, line: 31 +# File: starter, line: 36 +# File: obi-functions, line: 48 +# File: functions, line: 46 +# File: confirm-partition, line: 39 +#, sh-format +msgid "s" +msgstr "" +# +# File: zmktbl, line: 32 +#, sh-format +msgid "Source partition" +msgstr "" +# +#. # hotkey for "Check (and repair) the file system" +# File: zmktbl, line: 33 +# File: starter, line: 52 +#, sh-format +msgid "c" +msgstr "" +# +# File: zmktbl, line: 34 +#, sh-format +msgid "Compression, gzip or xz" +msgstr "" +# +#. # hotkey for 'Tips' +#. # hotkey pair with Tips +# File: zmktbl, line: 35 +# File: starter, line: 50 +# File: confirm-partition, line: 67 +#, sh-format +msgid "t" +msgstr "" +# +# File: zmktbl, line: 36 +#, sh-format +msgid "Target file name with path" +msgstr "" +# +#. # hotkey for 'Quit' +#. # the hotkey for "Quit, no tarball selected" +#. # Hotkey for: "Quit" +#. # Hotkey for 'Quit' +#. # hotkey pair with "Quit" +# File: zmktbl, line: 37 +# File: text-mode-menu, line: 35 +# File: starter, line: 54 +# File: select-tarball, line: 12 +# File: obi-functions, line: 29 +# File: functions, line: 27 +# File: dltbl, line: 25 +# File: confirm-partition, line: 52 +#, sh-format +msgid "q" +msgstr "" +# +# File: zmktbl, line: 38 +# File: text-mode-menu, line: 40 +# File: starter, line: 34 +# File: select-part2, line: 19 +# File: obi-readme, line: 9 +# File: obi-functions, line: 30 +# File: functions, line: 28 +# File: dltbl, line: 23 +# File: confirm-partition, line: 53 +#, sh-format +msgid "Quit" +msgstr "Dejar" +# +# File: zmktbl, line: 41 +#, sh-format +msgid "Error in mkmaster" +msgstr "" +# +# File: zmktbl, line: 42 +#, sh-format +msgid "select compression" +msgstr "" +# +# File: zmktbl, line: 43 +#, sh-format +msgid "TRUE" +msgstr "CIERTO" +# +# File: zmktbl, line: 44 +#, sh-format +msgid "FALSE" +msgstr "FALSO" +# +# File: zmktbl, line: 45 +#, sh-format +msgid "Click the radio button to select compression" +msgstr "" +# +# File: zmktbl, line: 46 +#, sh-format +msgid "Compression" +msgstr "" +# +# File: zmktbl, line: 47 +#, sh-format +msgid "make a 'tar.xz' file" +msgstr "" +# +# File: zmktbl, line: 48 +#, sh-format +msgid "make a 'tar.gz' file" +msgstr "" +# +# File: zmktbl, line: 50 +#, sh-format +msgid "Error in select-compression" +msgstr "" +# +# File: zmktbl, line: 51 +#, sh-format +msgid "Select target file" +msgstr "" +# +# File: zmktbl, line: 52 +# File: dltbl, line: 17 +#, sh-format +msgid "There should be enough space for the new tarball" +msgstr "" +# +# File: zmktbl, line: 53 +#, sh-format +msgid "Click this if you want to make this tarball" +msgstr "" +# +# File: zmktbl, line: 54 +#, sh-format +msgid "Remove some old tarball?" +msgstr "" +# +# File: zmktbl, line: 56 +#, sh-format +msgid "" +"Remove some old tarball(s) only if necessary, In that case,\\nplease " +"continue the dialogue in the zMktbl text console" +msgstr "" +# +# File: zmktbl, line: 57 +#, sh-format +msgid "No, continue without removing any tarball" +msgstr "" +# +# File: zmktbl, line: 58 +#, sh-format +msgid "Yes, remove some old tarball" +msgstr "" +# +# File: zmktbl, line: 59 +#, sh-format +msgid "Click this if you want to remove some old tarball" +msgstr "" +# +# File: zmktbl, line: 60 +#, sh-format +msgid "remove old tarballs" +msgstr "" +# +# File: zmktbl, line: 61 +#, sh-format +msgid "" +"Check the box to select tarballs to remove.\n" +"(spaces are replaced with .'. in the list)" +msgstr "" +# +# File: zmktbl, line: 63 +#, sh-format +msgid "Old tarballs" +msgstr "" +# +# File: zmktbl, line: 64 +#, sh-format +msgid "Click this if you want to remove these old tarballs" +msgstr "" +# +# File: zmktbl, line: 66 +#, sh-format +msgid "FINAL WARNING\\nDo you want to make this tarball?" +msgstr "" +# +#. # Enter is the Return (Enter) key on the keyboard +#. # Enter is the key on the keyboard +# File: zmktbl, line: 67 +# File: select-device, line: 17 +# File: mktbl, line: 17 +# File: dltbl, line: 32 +# File: confirm-partition, line: 82 +#, sh-format +msgid "Check the result and press Enter to continue" +msgstr "Verifique el resultado y presione Enter para continuar" +# +#. ########################################################## +#. # Usage text +# File: zmktbl, line: 68 +# File: select-tarball, line: 5 +# File: select-device, line: 8 +# File: obi, line: 10 +# File: mktbl, line: 18 +# File: dltbl, line: 13 +# File: confirm-partition, line: 87 +#, sh-format +msgid "Usage" +msgstr "Uso" +# +# File: zmktbl, line: 71 +# File: mktbl, line: 21 +#, sh-format +msgid "to make a tarball of the files" +msgstr "" +# +# File: zmktbl, line: 74 +# File: mktbl, line: 24 +#, sh-format +msgid "Partition to be used:" +msgstr "" +# +# File: zmktbl, line: 76 +# File: mktbl, line: 26 +#, sh-format +msgid "" +"You may need to remove some existing tarballs,\\n'*.tar.gz' and '*.tar.xz' " +"from the tarballs directory\\nto make space for the new tarball" +msgstr "" +# +# File: zmktbl, line: 77 +# File: mktbl, line: 27 +#, sh-format +msgid "These main commands are prepared:" +msgstr "" +# +# File: zmktbl, line: 79 +#, sh-format +msgid "" +"Do you want to use -9e compression for the XZ?\\nThis will make the tarball " +"significantly smaller, but will take MUCH longer to compress." +msgstr "" +# +#. ########################################################## +# File: user-config, line: 21 +#, sh-format +msgid "Please Contact the Distro maintainer" +msgstr "" +# +# File: user-config, line: 22 +#, sh-format +msgid "Removed old user named" +msgstr "Se eliminó el usuario antiguo llamado" +# +# File: user-config, line: 23 +#, sh-format +msgid "Removed old group named" +msgstr "Se eliminó el antiguo grupo llamado" +# +# File: user-config, line: 24 +#, sh-format +msgid "Removing" +msgstr "" +# +# File: user-config, line: 25 +#, sh-format +msgid "Enter your new user's name" +msgstr "Ingrese el nombre de su nuevo usuario" +# +# File: user-config, line: 26 +#, sh-format +msgid "Added" +msgstr "" +# +# File: user-config, line: 27 +#, sh-format +msgid "Create Password" +msgstr "Crear contraseña" +# +# File: user-config, line: 28 +#, sh-format +msgid "Create password" +msgstr "Crear contraseña" +# +# File: user-config, line: 29 +#, sh-format +msgid "Submit" +msgstr "Entregar" +# +#. # Arrod DOWN and TAB are keyboard keys +# File: user-config, line: 31 +#, sh-format +msgid "Arrow DOWN for 'Repeat password', TAB for 'Submit'" +msgstr "Flecha ABAJO para 'Repetir contraseña', TAB para 'Enviar'" +# +# File: user-config, line: 32 +#, sh-format +msgid "Create new password" +msgstr "Crear nueva contraseña" +# +# File: user-config, line: 33 +#, sh-format +msgid "Repeat the password" +msgstr "Repite la contraseña" +# +#. # number 6 +# File: user-config, line: 35 +#, sh-format +msgid "too short password, use at least 6 characters" +msgstr "contraseña demasiado corta, use al menos 6 caracteres" +# +# File: user-config, line: 36 +#, sh-format +msgid "the password entries match, go ahead ..." +msgstr "las entradas de contraseña coinciden, adelante..." +# +# File: user-config, line: 37 +#, sh-format +msgid "SPACES NOT ALLOWED IN PASSWORDS! Try again, please!" +msgstr "¡ESPACIOS NO PERMITIDOS EN CONTRASEÑAS!¡Por favor, inténtalo de nuevo!" +# +# File: user-config, line: 38 +#, sh-format +msgid "the passwords do not match, try again" +msgstr "las contraseñas no coinciden, intenta de nuevo" +# +# File: user-config, line: 39 +#, sh-format +msgid "Groups:" +msgstr "" +# +# File: user-config, line: 40 +#, sh-format +msgid "Auto Login" +msgstr "Ingreso automático" +# +# File: user-config, line: 41 +#, sh-format +msgid "Do you want to log your user in automatically?" +msgstr "¿Quieres iniciar sesión en tu usuario automáticamente?" +# +# File: user-config, line: 42 +#, sh-format +msgid "Autologin for" +msgstr "" +# +# File: user-config, line: 43 +#, sh-format +msgid "No autologin for" +msgstr "" +# +# File: user-config, line: 44 +#, sh-format +msgid "Computer supports PAE" +msgstr "" +# +#. # PLEASE LEAVE \n this is a NEW LINE character to put the second sentence on a new line +#. # PAE is an acronym please leave it as is +# File: user-config, line: 47 +#, sh-format +msgid "" +"Do you want to install the PAE kernel now?\\n\n" +"If you are UNSURE you can always do this later, it is not needed." +msgstr "¿Desea instalar el kernel PAE ahora?\\n\n" +"Si no está SEGURO de que siempre puede hacer esto más adelante, no es necesario." +# +# File: user-config, line: 49 +#, sh-format +msgid "Yes install PAE chosen." +msgstr "" +# +# File: user-config, line: 50 +#, sh-format +msgid "set password for" +msgstr "" +# +# File: user-config, line: 51 +#, sh-format +msgid "No install PAE chosen." +msgstr "" +# +#. # CPU is an acronym you can translate it, this is the Central Processing Unit.. or 'Processor' +#. # flag in this case is a marker set by the processor internally, this is not a flag on a pole. +# File: user-config, line: 54 +#, sh-format +msgid "CPU has no PAE flag" +msgstr "" +# +#. # 64bit is a type of processor architecture +# File: user-config, line: 56 +#, sh-format +msgid "64bit processor" +msgstr "" +# +# File: user-config, line: 57 +#, sh-format +msgid "You might want to consider using a 64bit operating system" +msgstr "" +# +# File: user-config, line: 59 +#, sh-format +msgid "CPU is not 64bit" +msgstr "" +# +#. # xdg-dirs and gtk-dirs are programs... leave the names as is please +# File: user-config, line: 61 +#, sh-format +msgid "updated menus, and xdg-dirs and gtk-dirs" +msgstr "" +# +#. # XDG and GTK do not need to be translated +#. # xdg-user-dirs-gtk-update is a program +# File: user-config, line: 64 +#, sh-format +msgid "" +"Updated menus, and XDG directories but not GTK directories.. xdg-user-dirs-" +"gtk-update is not installed" +msgstr "" +# +# File: user-config, line: 65 +# File: starter, line: 78 +# File: select-part1, line: 20 +# File: obi-functions, line: 18 +# File: functions, line: 16 +#, sh-format +msgid "WARNING" +msgstr "ADVERTENCIA" +# +#. # lightdm is a program. +#. # tarball is a compressed file format +# File: user-config, line: 68 +#, sh-format +msgid "LightDm is not installed on the tarball. This may be a software bug." +msgstr "" +# +# File: user-config, line: 69 +#, sh-format +msgid "Set system-wide time to" +msgstr "" +# +# File: user-config, line: 70 +#, sh-format +msgid "Set user's time to" +msgstr "Establecer el tiempo de todo el sistema para:" +# +#. # dpkg-reconfigure is a program +# File: user-config, line: 74 +#, sh-format +msgid "dpkg-reconfigure not installed on system (tarball)" +msgstr "" +# +# File: user-config, line: 75 +#, sh-format +msgid "updatedb OR updatedb.mlocate not located on tarball" +msgstr "" +# +#. # chown is a program +# File: user-config, line: 77 +#, sh-format +msgid "chown recursivley" +msgstr "" +# +#. # gksu and sudo are programs for giving a user administrator's rights +# File: user-config, line: 79 +#, sh-format +msgid "changed gksu to sudo mode for" +msgstr "" +# +# File: user-config, line: 80 +#, sh-format +msgid "Configure Timezone" +msgstr "Configurar la zona horaria" +# +# File: user-config, line: 81 +#, sh-format +msgid "Configure Keyboard" +msgstr "Configurar el teclado" +# +# File: user-config, line: 82 +#, sh-format +msgid "Updating:" +msgstr "Actualizando:" +# +#. ########################################################## +# File: user-config, line: 83 +# File: starter, line: 26 +# File: select-tarball, line: 14 +# File: select-part2, line: 22 +# File: select-part2, line: 26 +# File: select-part1, line: 24 +# File: select-part1, line: 29 +# File: partition-help, line: 40 +# File: obi-functions, line: 76 +# File: obi, line: 15 +# File: mkp, line: 20 +# File: hw-progress, line: 7 +# File: functions, line: 74 +# File: dltbl, line: 19 +# File: confirm-partition, line: 20 +#, sh-format +msgid "One Button Installer" +msgstr "Instalador de un botón" +# +# File: user-config, line: 84 +#, sh-format +msgid "Installing PAE Kernel" +msgstr "Instalando PAE Kernel" +# +# File: user-config, line: 85 +#, sh-format +msgid "64bit OS doesn't require PAE installation" +msgstr "" +# +# File: user-config, line: 86 +#, sh-format +msgid "Updating the System" +msgstr "Actualizando el sistema" +# +# File: user-config, line: 87 +#, sh-format +msgid "Check for post-release Updates to the System?" +msgstr "¿Buscar actualizaciones posteriores al lanzamiento del sistema?" +# +# File: user-config, line: 88 +#, sh-format +msgid "" +"Please Note, this operation could take a long time depending on your " +"internet connection, and hardware." +msgstr "Tenga en cuenta que esta operación podría llevar mucho tiempo según su " +"conexión a internet y hardware." +# +#. ########################################################## +# File: text-mode-menu, line: 33 +#, sh-format +msgid "PAE flag detected" +msgstr "" +# +# File: text-mode-menu, line: 34 +#, sh-format +msgid "No PAE flag found" +msgstr "" +# +#. # hotkey for "Installer Mode:" +#. # hotkey pair with "Overview" +# File: text-mode-menu, line: 36 +# File: starter, line: 46 +# File: confirm-partition, line: 58 +#, sh-format +msgid "o" +msgstr "" +# +#. # hotkey for "Reboot" +#. # hotkey pair with "Root partition - select or change" +# File: text-mode-menu, line: 37 +# File: starter, line: 56 +# File: confirm-partition, line: 64 +#, sh-format +msgid "r" +msgstr "" +# +#. # Hotkey for: "General File selector" +#. # hotkey pair with "Go ahead - confirm the choice" +# File: text-mode-menu, line: 38 +# File: obi-functions, line: 54 +# File: functions, line: 52 +# File: confirm-partition, line: 44 +#, sh-format +msgid "g" +msgstr "" +# +#. # hotkey for "Poweroff" +# File: text-mode-menu, line: 39 +# File: starter, line: 58 +# File: confirm-partition, line: 92 +#, sh-format +msgid "p" +msgstr "" +# +# File: text-mode-menu, line: 41 +#, sh-format +msgid "One Button Installer text mode Menu" +msgstr "Menú de modo de texto del Instalador de Un Botón" +# +# File: text-mode-menu, line: 42 +#, sh-format +msgid "Please select an alternative with a letter key or the arrow keys" +msgstr "Seleccione una alternativa con una tecla de letra o las teclas de flecha" +# +# File: text-mode-menu, line: 43 +#, sh-format +msgid "Graphics mode with Gparted and One Button Installer" +msgstr "Modo de gráficos con Gparted y Instalador de Un Botón" +# +# File: text-mode-menu, line: 44 +#, sh-format +msgid "One Button Installer in text mode (if very low RAM)" +msgstr "Instalador de Un Botón en modo texto (si la memoria RAM es muy baja)" +# +# File: text-mode-menu, line: 45 +#, sh-format +msgid "Quit from this menu (exit to the bash shell)" +msgstr "Salir de este menú (salir al shell bash)" +# +# File: text-mode-menu, line: 46 +# File: starter, line: 69 +#, sh-format +msgid "Reboot" +msgstr "Reiniciar" +# +# File: text-mode-menu, line: 47 +#, sh-format +msgid "Poweroff" +msgstr "Apagado" +# +# File: text-mode-menu, line: 48 +#, sh-format +msgid "Total RAM" +msgstr "RAM total" +# +# File: text-mode-menu, line: 49 +#, sh-format +msgid "Used RAM" +msgstr "RAM utilizada" +# +# File: text-mode-menu, line: 50 +#, sh-format +msgid "text not found. Change directory!" +msgstr "" +# +# File: text-mode-menu, line: 51 +#, sh-format +msgid "It seems you are running inside a graphical environment already" +msgstr "" +# +#. ########################################################## +# File: starter, line: 21 +# File: mkctrl, line: 8 +#, sh-format +msgid "Tarball path" +msgstr "" +# +# File: starter, line: 22 +#, sh-format +msgid "OBI text not found. Change directory" +msgstr "" +# +# File: starter, line: 23 +#, sh-format +msgid "Exit to the Shell" +msgstr "Salir a la Shell" +# +# File: starter, line: 24 +#, sh-format +msgid "Close Window" +msgstr "Cerrar ventana" +# +# File: starter, line: 25 +#, sh-format +msgid "to make the tarballs" +msgstr "" +# +# File: starter, line: 27 +# File: obi-functions, line: 11 +# File: functions, line: 9 +#, sh-format +msgid "OK" +msgstr "OK" +# +# File: starter, line: 28 +#, sh-format +msgid "OS to install" +msgstr "Sistema operativo para instalar" +# +# File: starter, line: 29 +#, sh-format +msgid "Unlabeled OS to install" +msgstr "Sistema operativo sin etiqueta para instalar" +# +# File: starter, line: 30 +#, sh-format +msgid "No tarball selected" +msgstr "" +# +# File: starter, line: 31 +#, sh-format +msgid "Had to find a tarball.. OBI found" +msgstr "" +# +# File: starter, line: 32 +#, sh-format +msgid "Starter Menu" +msgstr "Menú de inicio" +# +# File: starter, line: 33 +# File: obi-functions, line: 45 +# File: functions, line: 43 +# File: confirm-partition, line: 49 +#, sh-format +msgid "Please select an action with a letter key or the arrow keys" +msgstr "Seleccione una acción con una tecla de letra o las teclas de flecha" +# +#. # hotkey for "Partition drives and \Z1Install alongside current OS\Zn" 'used alongside for the a' +#. # Hotkey for: "all files suitable as source files" +#. # hotkey pair with "Autoselect - select root and swap partitions automatically" +# File: starter, line: 38 +# File: obi-functions, line: 58 +# File: functions, line: 56 +# File: confirm-partition, line: 61 +#, sh-format +msgid "a" +msgstr "" +# +#. # hotkey for "Install" +#. # ISO is a file format for CD images +#. # Hotkey for: "only ISO files" +# File: starter, line: 40 +# File: obi-functions, line: 62 +# File: functions, line: 60 +#, sh-format +msgid "i" +msgstr "" +# +#. # hotkey for "Download Tarball" +# File: starter, line: 42 +#, sh-format +msgid "d" +msgstr "" +# +#. # hotkey for "Make Tarball" +#. # Hotkey for: "only image files (with and without compression)" +# File: starter, line: 44 +# File: obi-functions, line: 65 +# File: functions, line: 63 +#, sh-format +msgid "m" +msgstr "" +# +#. # hotkey for "Help to select drive" +#. # hotkey pair with 'Create a separate /home partition', OR 'Change /home partition' +# File: starter, line: 48 +# File: confirm-partition, line: 72 +#, sh-format +msgid "h" +msgstr "" +# +# File: starter, line: 59 +# File: confirm-partition, line: 70 +#, sh-format +msgid "Tips (use arrow keys to scroll)" +msgstr "Consejos (use las teclas de flecha para desplazarse)" +# +# File: starter, line: 60 +#, sh-format +msgid "Select tarball to install" +msgstr "Seleccione tarball para instalar" +# +#. # please leave \Z1 and \Zn these make the text bold +# File: starter, line: 62 +#, sh-format +msgid "Partition drives and \\Z1Install alongside current OS\\Zn" +msgstr "Unidades de partición y \\Z1Instalar junto con el Sistema operativo actual \\Zn" +# +# File: starter, line: 63 +#, sh-format +msgid "Download Tarball" +msgstr "Descargar Tarball" +# +# File: starter, line: 64 +#, sh-format +msgid "Make Tarball" +msgstr "Hacer Tarball" +# +# File: starter, line: 65 +#, sh-format +msgid "Help to select drive" +msgstr "Ayuda para seleccionar la unidad" +# +# File: starter, line: 66 +#, sh-format +msgid "Tips" +msgstr "Consejos" +# +# File: starter, line: 67 +#, sh-format +msgid "Check (and repair) the file system" +msgstr "Verificar (y reparar) el sistema de archivos" +# +# File: starter, line: 68 +#, sh-format +msgid "Quit from this menu" +msgstr "Salir de este menú" +# +# File: starter, line: 70 +#, sh-format +msgid "Power Off" +msgstr "Apagado" +# +# File: starter, line: 71 +# File: confirm-partition, line: 95 +#, sh-format +msgid "Install" +msgstr "Instalar" +# +#. # SPLASH SCREEN TEXT +# File: starter, line: 73 +#, sh-format +msgid "Welcome and Warning" +msgstr "Bienvenida y Advertencia" +# +# File: starter, line: 74 +#, sh-format +msgid "Welcome" +msgstr "Bienvenido" +# +#. # These Lines until END will be a paragraph, modify them as you need to +#. # please leave \Z1 and \Zn these make the text bold so make 'risky' BOLD +# File: starter, line: 77 +#, sh-format +msgid "Installing an operating system is a \\Z1risky\\Zn operation." +msgstr "La instalación de un sistema operativo es una operación \\Z1risky \\Zn." +# +#. # please leave \Z1 and \Zn these make the text bold +# File: starter, line: 80 +#, sh-format +msgid "\\Z1Copy the data you want to keep to another device\\Zn, for example:" +msgstr "\\Z1 Copie los datos que desea conservar en otro dispositivo \\Zn, por ejemplo:" +# +# File: starter, line: 81 +#, sh-format +msgid "an external hard disk drive or a cloud service! Otherwise," +msgstr "una unidad de disco duro externa o un servicio en la nube!" +# +# File: starter, line: 82 +#, sh-format +msgid "there might be no easy way to recover any previous data." +msgstr "puede que no haya una manera fácil de recuperar datos anteriores." +# +# File: starter, line: 83 +#, sh-format +msgid "Expensive intelligence services might restore some data." +msgstr "Los costosos servicios de inteligencia pueden restaurar algunos datos." +# +# File: starter, line: 84 +#, sh-format +msgid "If you use the BASIC installer the target device will be" +msgstr "Si usa el instalador BASIC, el dispositivo de destino será" +# +# File: starter, line: 85 +#, sh-format +msgid "COMPLETELY OVERWRITTEN" +msgstr "COMPLETAMENTE SOBRESCRITO" +# +# File: starter, line: 86 +#, sh-format +msgid "If you want to keep an installed operating system," +msgstr "Si desea mantener un sistema operativo instalado," +# +#. # The line after this is the same as: Partition drives and \Z1Install alongside current OS\Zn +#. # this line is the END +# File: starter, line: 89 +#, sh-format +msgid "make sure to use the option" +msgstr "asegúrese de usar la opción" +# +#. # Splash as in 'Splash Screen' +# File: starter, line: 91 +#, sh-format +msgid "Splash" +msgstr "Pantalla de bienvenida" +# +# File: starter, line: 92 +#, sh-format +msgid "Is this a tarball you want to use:" +msgstr "¿Es esto un tarball que quieres usar?" +# +# File: starter, line: 93 +#, sh-format +msgid "Installer Mode:" +msgstr "Modo de instalación:" +# +# File: starter, line: 94 +# File: setlevel, line: 7 +#, sh-format +msgid "basic" +msgstr "basic" +# +# File: starter, line: 95 +# File: setlevel, line: 8 +#, sh-format +msgid "advanced" +msgstr "avanzado" +# +# File: starter, line: 96 +# File: obi-functions, line: 73 +# File: functions, line: 71 +# File: dltbl, line: 36 +# File: confirm-partition, line: 94 +#, sh-format +msgid "Hotkey" +msgstr "Tecla de acceso directo" +# +#. ############################### +# File: setlevel, line: 5 +#, sh-format +msgid "Seleccione el nivel 'OBI' básico o avanzado" +msgstr "" +# +# File: setlevel, line: 6 +#, sh-format +msgid "The WHOLE device is ERASED and used" +msgstr "El dispositivo ENTERO se BORRA y se usa" +# +# File: setlevel, line: 9 +#, sh-format +msgid "Prepare partitions with Gparted for the advanced method" +msgstr "" +# +# File: setlevel, line: 10 +#, sh-format +msgid "Partitions are selected and used" +msgstr "" +# +# File: setlevel, line: 11 +#, sh-format +msgid "Select OBI level" +msgstr "" +# +# File: select-tarball, line: 6 +#, sh-format +msgid "Select tarball" +msgstr "" +# +# File: select-tarball, line: 7 +#, sh-format +msgid "avoid spaces in tarball names" +msgstr "" +# +#. # \n is a newline character please leave to separate lines +# File: select-tarball, line: 9 +# File: dltbl, line: 21 +#, sh-format +msgid "Please select a tarball with the arrow keys, scroll if necessary" +msgstr "" +# +# File: select-tarball, line: 10 +#, sh-format +msgid "Quit, no tarball selected" +msgstr "" +# +# File: select-tarball, line: 13 +# File: dltbl, line: 22 +#, sh-format +msgid "Available tarballs" +msgstr "" +# +# File: select-tarball, line: 15 +#, sh-format +msgid "Select tarball to use with the One Button Installer" +msgstr "" +# +# File: select-tarball, line: 16 +#, sh-format +msgid "Tarball selector (easy)" +msgstr "" +# +# File: select-tarball, line: 17 +#, sh-format +msgid "General File selector (difficult)" +msgstr "" +# +#. # \n is a newline character please leave to separate lines +# File: select-tarball, line: 19 +#, sh-format +msgid "" +"Select tarballs in standard directory (easy), or\\n\n" +"anywhere with the general file selector (difficult)?" +msgstr "" +# +# File: select-tarball, line: 21 +#, sh-format +msgid "Zero sized tarball found:" +msgstr "" +# +# File: select-tarball, line: 22 +#, sh-format +msgid "Remove it? (y/n)" +msgstr "" +# +#. # SPACE BAR and SLASH are keyboard keys +# File: select-tarball, line: 24 +#, sh-format +msgid "" +"SPACE BAR: copy selection to text-entry window, SLASH: show directory content" +msgstr "" +# +# File: select-tarball, line: 25 +#, sh-format +msgid "No tarball found (tarballs/filename.tar.gz)" +msgstr "" +# +#. ############################### +# File: select-part2, line: 14 +#, sh-format +msgid "This device mounted and cannot be unmounted:" +msgstr "" +# +# File: select-part2, line: 15 +#, sh-format +msgid "You must stop the program locking it " +msgstr "" +# +# File: select-part2, line: 16 +#, sh-format +msgid "Select partition using this key:" +msgstr "" +# +# File: select-part2, line: 17 +#, sh-format +msgid "Partition:" +msgstr "" +# +# File: select-part2, line: 18 +#, sh-format +msgid "Select Partition:" +msgstr "" +# +#. ##################################################### +# File: select-part2, line: 20 +# File: select-part1, line: 19 +#, sh-format +msgid "Usage:" +msgstr "Uso:" +# +# File: select-part2, line: 21 +#, sh-format +msgid "Select partition for the advanced Installer level" +msgstr "" +# +# File: select-part2, line: 23 +#, sh-format +msgid "Examples:" +msgstr "" +# +# File: select-part2, line: 24 +#, sh-format +msgid "scroll if necessary " +msgstr "" +# +# File: select-part2, line: 25 +#, sh-format +msgid "You must select a root partition" +msgstr "" +# +# File: select-part2, line: 27 +#, sh-format +msgid "NAME" +msgstr "" +# +# File: select-part2, line: 28 +#, sh-format +msgid "SIZE" +msgstr "" +# +# File: select-part2, line: 30 +#, sh-format +msgid "FSTYPE" +msgstr "" +# +# File: select-part2, line: 31 +#, sh-format +msgid "LABEL" +msgstr "" +# +# File: select-part2, line: 32 +#, sh-format +msgid "MOUNTPOINT" +msgstr "" +# +#. #paired with No_swap +# File: select-part2, line: 34 +#, sh-format +msgid "n" +msgstr "" +# +#. #please do not put spaces in this!!! +# File: select-part2, line: 36 +#, sh-format +msgid "No_swap" +msgstr "" +# +# File: select-part1, line: 21 +#, sh-format +msgid "the partitions will be completely overwritten" +msgstr "" +# +# File: select-part1, line: 22 +#, sh-format +msgid "Get more help to select device at the Starter menu" +msgstr "" +# +# File: select-part1, line: 23 +#, sh-format +msgid "Unmount the target partitions if mounted" +msgstr "" +# +# File: select-part1, line: 25 +#, sh-format +msgid "Select partition" +msgstr "" +# +# File: select-part1, line: 26 +# File: select-device, line: 9 +#, sh-format +msgid "Install:" +msgstr "Instalar:" +# +#. # \n is a newline character please leave to separate lines +# File: select-part1, line: 27 +# File: select-device, line: 13 +#, sh-format +msgid "" +"Install to a mass storage device, typically an\\ninternal hard disk drive or " +"external USB or eSATA drive" +msgstr "" +# +# File: select-device, line: 10 +#, sh-format +msgid "Installing:" +msgstr "Instalación:" +# +# File: select-device, line: 11 +#, sh-format +msgid "Target:" +msgstr "Objetivo:" +# +# File: select-device, line: 14 +# File: obi-functions, line: 13 +# File: functions, line: 11 +#, sh-format +msgid "Select device" +msgstr "Seleccione el dispositivo" +# +# File: select-device, line: 15 +#, sh-format +msgid "Do you want to install:" +msgstr "¿Quieres instalar?" +# +# File: select-device, line: 18 +#, sh-format +msgid "Check the result" +msgstr "" +# +# File: select-device, line: 19 +#, sh-format +msgid "Choose the drive to install to:" +msgstr "Elija la unidad para instalar en:" +# +#. ########################################################## +#. # \n is a new line character please leave alone +# File: partition-help, line: 15 +#, sh-format +msgid "Error finding the OBI path.\\nEXITING IMMEDIATELY" +msgstr "" +# +# File: partition-help, line: 16 +#, sh-format +msgid "" +"You can install a system from a tarball into two partitions:\\n\\n one root " +"file system partition and one swap partition. This way it is possible to " +"create a *dual boot* device with an existing (already installed) operating " +"system. It is also possible to create a separate\\n*data partition*, that " +"can be used by linux as well as Windows. (Must be FAT32, FAT16, or NTFS) OSX " +"uses HFS and HFS+, though FAT32 will work well with both OSX and Linux. " +"NTFS is usable by OSX through 3rd party apps.\\n\\n" +msgstr "" +# +# File: partition-help, line: 17 +#, sh-format +msgid "OBI detects" +msgstr "" +# +# File: partition-help, line: 18 +#, sh-format +msgid "device" +msgstr "" +# +# File: partition-help, line: 19 +#, sh-format +msgid "devices" +msgstr "" +# +# File: partition-help, line: 20 +#, sh-format +msgid "" +"NOTE: If you do not wish to hibernate/suspend you can use 1G (or less) for " +"your Swap" +msgstr "" +# +#. # please leave ${redtext} ${greentext} ${resetvid} in place +# File: partition-help, line: 22 +#, sh-format +msgid "Edit and create partitions" +msgstr "" +# +#. # this is used in a tabbed chart to show the disk drive device name and size \t is the TAB character leave it alone please +# File: partition-help, line: 26 +#, sh-format +msgid "For example: \\n The drive \\t Size" +msgstr "" +# +# File: partition-help, line: 28 +#, sh-format +msgid "You have existing SWAP partition(s) here:" +msgstr "" +# +# File: partition-help, line: 29 +#, sh-format +msgid "" +"NOTE, if you want to hibernate your SWAP should be somewhat larger than your " +"RAM" +msgstr "" +# +# File: partition-help, line: 30 +#, sh-format +msgid "Help to partition" +msgstr "" +# +# File: partition-help, line: 31 +#, sh-format +msgid "" +"No Root partition made with the label obi-root\\nDo you want to try again?" +msgstr "" +# +# File: partition-help, line: 32 +#, sh-format +msgid "Use Gparted and prepare the device for the installer in the next step" +msgstr "" +# +#. # please leave obi-root as is +# File: partition-help, line: 35 +#, sh-format +msgid "1. Put the label obi-root to one partition and format it to FAT32" +msgstr "" +# +#. # please leave obi-swap in this as is +# File: partition-help, line: 37 +#, sh-format +msgid "2. Put the label obi-swap to one partition and format it to FAT32" +msgstr "" +# +# File: partition-help, line: 38 +#, sh-format +msgid "(It is fast to format to FAT32, and it will be overwritten by the OBI)" +msgstr "" +# +# File: partition-help, line: 39 +#, sh-format +msgid "*. The other partitions 'can be anything else'" +msgstr "" +# +#. ########################################################## +# File: obi-readme, line: 8 +#, sh-format +msgid "Help" +msgstr "Ayuda" +# +# File: obi-readme, line: 10 +#, sh-format +msgid "Quick Start Guide" +msgstr "Guía de inicio rápido" +# +# File: obi-readme, line: 11 +#, sh-format +msgid "Detailed Help" +msgstr "Ayuda detallada" +# +# File: obi-readme, line: 12 +#, sh-format +msgid "About OBI" +msgstr "" +# +# File: obi-readme, line: 13 +#, sh-format +msgid "Learn more about the One Button Installer" +msgstr "" +# +#. ########################################################## +# File: obi-functions, line: 8 +# File: mktbl, line: 29 +#, sh-format +msgid "Press Enter to continue" +msgstr "Presione Enter para continuar" +# +# File: obi-functions, line: 9 +#, sh-format +msgid "Error finding the tarball path so it was made at" +msgstr "" +# +#. ########################################################## +# File: obi-functions, line: 10 +# File: functions, line: 8 +#, sh-format +msgid "Help info to select drive" +msgstr "Información de ayuda para seleccionar la unidad" +# +# File: obi-functions, line: 12 +# File: functions, line: 10 +#, sh-format +msgid "Use Arrow PgUp PgDn Home End keys to scroll this help info" +msgstr "" +# +# File: obi-functions, line: 14 +# File: functions, line: 12 +#, sh-format +msgid "warning and overview" +msgstr "" +# +#. # please leave \n and \Zn and \Z1 \n is a new line, \Z1 and \Zn make text BOLD +# File: obi-functions, line: 16 +# File: functions, line: 14 +#, sh-format +msgid "You NEED to choose a device for the bootloader" +msgstr "NECESITA elegir un dispositivo para el gestor de arranque" +# +# File: obi-functions, line: 17 +# File: functions, line: 15 +#, sh-format +msgid "" +": the device will be completely overwritten\\Zn\\nGet more help to select " +"device at the Starter menu\\n\\Z1Unmount the target device if mounted" +msgstr "el dispositivo se sobrescribirá por completo\\Zn\\nObtenga más ayuda para seleccionar " +"dispositivo en el menú de inicio\\n\\Z1Desmontar el dispositivo de destino si está montado" +# +#. # HotKey for: "toggle USB-only" +# File: obi-functions, line: 20 +# File: functions, line: 18 +#, sh-format +msgid "u" +msgstr "" +# +# File: obi-functions, line: 21 +# File: functions, line: 19 +#, sh-format +msgid "toggle USB-only" +msgstr "alternar solo USB" +# +# File: obi-functions, line: 22 +# File: functions, line: 20 +#, sh-format +msgid "show all drives" +msgstr "mostrar todas las unidades" +# +# File: obi-functions, line: 23 +# File: functions, line: 21 +#, sh-format +msgid "hide other drives" +msgstr "esconder otras unidades" +# +# File: obi-functions, line: 24 +# File: functions, line: 22 +#, sh-format +msgid "quit installing" +msgstr "dejar de instalar" +# +# File: obi-functions, line: 25 +# File: functions, line: 23 +#, sh-format +msgid "and continue" +msgstr "y continuar" +# +# File: obi-functions, line: 26 +# File: functions, line: 24 +#, sh-format +msgid "Please select a device with the arrow keys, scroll if necessary" +msgstr "Seleccione un dispositivo con las teclas de flecha, desplácese si es necesario" +# +# File: obi-functions, line: 27 +# File: functions, line: 25 +#, sh-format +msgid "Go" +msgstr "Proceder" +# +# File: obi-functions, line: 31 +# File: functions, line: 29 +#, sh-format +msgid "wiping" +msgstr "" +# +#. # please leave \n this is a new line character +# File: obi-functions, line: 33 +# File: functions, line: 31 +#, sh-format +msgid "installing\\n\\nthe operating system" +msgstr "instalando \\n\\nel sistema operativo" +# +# File: obi-functions, line: 34 +# File: functions, line: 32 +#, sh-format +msgid "FINAL WARNING" +msgstr "ÚLTIMA ADVERTENCIA" +# +# File: obi-functions, line: 35 +# File: functions, line: 33 +#, sh-format +msgid "" +"before wiping and installing !!!\\nDo you really want to wipe and install to " +"this device?" +msgstr "" +# +#. #SPACEBAR and SLASH are keyboard keys +# File: obi-functions, line: 37 +# File: functions, line: 35 +#, sh-format +msgid "" +"SPACEBAR: copy selection to text-entry box, SLASH: show directory content" +msgstr "BARRA ESPACIADORA: copia la selección al cuadro de entrada de texto, SLASH: muestra el contenido del directorio" +# +# File: obi-functions, line: 38 +# File: functions, line: 36 +#, sh-format +msgid "Select source file" +msgstr "Seleccionar archivo fuente" +# +# File: obi-functions, line: 39 +# File: functions, line: 37 +#, sh-format +msgid "normal, file type filter" +msgstr "normal, filtro de tipo de archivo" +# +# File: obi-functions, line: 40 +# File: functions, line: 38 +#, sh-format +msgid "Find and select among iso and image files, or with a general selector." +msgstr "Encuentre y seleccione entre archivos iso e imagen, o con un selector general." +# +#. # please leave \n and \Zn and \Z1 \n is a new line, \Z1 and \Zn make text BOLD +# File: obi-functions, line: 42 +# File: functions, line: 40 +#, sh-format +msgid "" +"Increase the size of the terminal window, particularly the width!\\Zn\\nThen " +"the menus to 'select file' work better to show long file names.\\n\\n" +"\\Z1Avoid spaces and special characters in directory and file names!" +msgstr "" +# +#. # please leave \n and \Zn and \Z1 \n is a new line, \Z1 and \Zn make text BOLD +# File: obi-functions, line: 44 +# File: functions, line: 42 +#, sh-format +msgid "" +"Avoid spaces and special characters in directory and file names!\\Zn\\nUse a " +"high resolution screen, if possible more than 80 characters wide!\\nThen the " +"menus to 'select file' work better to show long file names.\\n\\n\\Z1Type " +"text in the bottom text box!\\Zn Use the upper text box(es) only to\\npaste " +"text into the bottom window (with the space key). The slash key\\ncan be " +"used to 'finish' moving to another directory." +msgstr "" +"¡Evite espacios y caracteres especiales en los nombres de directorios y archivos! \\Zn\\n¡Utilice una" +"pantalla de alta resolución, si es posible con más de 80 caracteres de ancho!\\nEntonces los" +"menús para 'seleccionar archivos' funcionan mejor para mostrar nombres de archivos largos.\\n\\n\\Z1¡Escribe" +"el texto en el cuadro de texto inferior!\\ZnUsa los cuadros de texto superiores solo para \\npegar" +"texto en la ventana inferior (con la tecla espacio). La tecla de barra inclinada\\nse puede" +"usar para terminar de mover a otro directorio." +# +# File: obi-functions, line: 46 +# File: functions, line: 44 +#, sh-format +msgid "iso and image file selector (easy), no search for linked files" +msgstr "selector de archivos iso e imagen (fácil), sin búsqueda de archivos vinculados" +# +# File: obi-functions, line: 49 +# File: functions, line: 47 +#, sh-format +msgid "iso and image file selector (easy), include Linked files (may fail)" +msgstr "selector de archivos iso e imagen (fácil), incluye archivos vinculados (puede fallar)" +# +#. # Hotkey for: "iso and image file selector (easy), include Linked files (may fail)" +# File: obi-functions, line: 51 +# File: functions, line: 49 +#, sh-format +msgid "l" +msgstr "" +# +# File: obi-functions, line: 52 +# File: functions, line: 50 +#, sh-format +msgid "General File selector" +msgstr "Selector general de archivos" +# +# File: obi-functions, line: 55 +# File: functions, line: 53 +#, sh-format +msgid "" +"Among files in the previously selected directory tree,\\nselect file type to " +"display" +msgstr "Entre los archivos del árbol de directorios previamente seleccionado, \\nseleccione el tipo de archivo para" +"mostrar" +# +# File: obi-functions, line: 56 +# File: functions, line: 54 +#, sh-format +msgid "Select file type to display" +msgstr "Seleccione el tipo de archivo para mostrar" +# +# File: obi-functions, line: 59 +# File: functions, line: 57 +#, sh-format +msgid "all files suitable as source files" +msgstr "todos los archivos adecuados como archivos fuente" +# +# File: obi-functions, line: 63 +# File: functions, line: 61 +#, sh-format +msgid "only ISO files" +msgstr "solo archivos ISO" +# +# File: obi-functions, line: 66 +# File: functions, line: 64 +#, sh-format +msgid "only image files (with and without compression)" +msgstr "" +# +# File: obi-functions, line: 67 +# File: functions, line: 65 +#, sh-format +msgid "Do you want to install it?" +msgstr "" +# +# File: obi-functions, line: 68 +# File: functions, line: 66 +#, sh-format +msgid "The program 'pv' can show the progress during the installation." +msgstr "" +# +# File: obi-functions, line: 69 +# File: functions, line: 67 +#, sh-format +msgid "Prepare by making the system up to date" +msgstr "" +# +# File: obi-functions, line: 70 +# File: functions, line: 68 +#, sh-format +msgid "however, it is not installed." +msgstr "" +# +# File: obi-functions, line: 71 +# File: functions, line: 69 +#, sh-format +msgid "Booted from" +msgstr "Arrancado desde" +# +# File: obi-functions, line: 72 +# File: functions, line: 70 +#, sh-format +msgid "Available devices" +msgstr "Dispositivos disponibles" +# +# File: obi-functions, line: 74 +# File: functions, line: 72 +#, sh-format +msgid "The target device will be:" +msgstr "El dispositivo de destino será:" +# +# File: obi-functions, line: 75 +# File: functions, line: 73 +#, sh-format +msgid "Target Device:" +msgstr "Dispositivo de destino:" +# +# File: obi-functions, line: 77 +# File: functions, line: 75 +# File: confirm-partition, line: 91 +#, sh-format +msgid "Click this if you are ready to go" +msgstr "Haga clic aquí si está listo para ir" +# +# File: obi-functions, line: 78 +# File: functions, line: 76 +#, sh-format +msgid "Error finding the OBI selected path" +msgstr "" +# +# File: obi-functions, line: 79 +# File: functions, line: 77 +#, sh-format +msgid "Script not found. Change directory" +msgstr "" +# +#. ########################################################## +# File: obi, line: 8 +#, sh-format +msgid "Run this as ROOT" +msgstr "" +# +# File: obi, line: 9 +#, sh-format +msgid "Install operating system with the One Button Installer" +msgstr "Instalar el sistema operativo con el instalador de un botón" +# +# File: obi, line: 11 +#, sh-format +msgid "Selected Tarball" +msgstr "" +# +# File: obi, line: 12 +#, sh-format +msgid "selecting" +msgstr "" +# +# File: obi, line: 13 +# File: confirm-partition, line: 84 +#, sh-format +msgid "with swap" +msgstr "" +# +# File: obi, line: 14 +#, sh-format +msgid "without swap" +msgstr "" +# +# File: obi, line: 16 +#, sh-format +msgid "Progress" +msgstr "Progreso" +# +#. ########################################################## +#. please leave zMktbl as is, also \n is the newline character +# File: mktbl, line: 16 +# File: dltbl, line: 18 +#, sh-format +msgid "Remove some old tarball(s) only if necessary" +msgstr "" +# +# File: mktbl, line: 28 +#, sh-format +msgid "Do you want to continue?" +msgstr "" +# +# File: mktbl, line: 30 +#, sh-format +msgid "Default" +msgstr "" +# +# File: mktbl, line: 31 +#, sh-format +msgid "compression" +msgstr "" +# +# File: mktbl, line: 32 +#, sh-format +msgid "filename" +msgstr "" +# +# File: mktbl, line: 33 +#, sh-format +msgid "source partition" +msgstr "" +# +# File: mktbl, line: 34 +#, sh-format +msgid "destination" +msgstr "" +# +# File: mktbl, line: 35 +#, sh-format +msgid "Example" +msgstr "" +# +# File: mktbl, line: 36 +#, sh-format +msgid "The file extension tar.xz or tar.gz is added automatically" +msgstr "" +# +# File: mktbl, line: 37 +#, sh-format +msgid "Run from bash if not default" +msgstr "" +# +# File: mktbl, line: 38 +#, sh-format +msgid "" +"The default is xz compression because it is often 20% or more\\nefficient " +"(smaller files) compared to gzip for gz files." +msgstr "" +# +# File: mktbl, line: 39 +#, sh-format +msgid "tarball finished, syncing now ..." +msgstr "" +# +#. ########################################################## +# File: mkpxpy, line: 8 +# File: mkp2p1, line: 9 +# File: mkp1, line: 9 +# File: mkp, line: 22 +#, sh-format +msgid "mount of what should become the root partition failed" +msgstr "" +# +# File: mkpxpy, line: 9 +# File: mkp, line: 23 +#, sh-format +msgid "Use existing swap partition" +msgstr "" +# +# File: mkpxpy, line: 10 +# File: mkp, line: 24 +#, sh-format +msgid "keep its UUID" +msgstr "" +# +# File: mkpxpy, line: 11 +# File: mkp, line: 25 +#, sh-format +msgid "Make a swap partition" +msgstr "" +# +# File: mkpxpy, line: 12 +# File: mkp, line: 26 +#, sh-format +msgid "and get new UUID" +msgstr "" +# +#. ########################################################## +# File: mkp, line: 8 +#, sh-format +msgid "Disk is smaller than" +msgstr "El disco es más pequeño que" +# +# File: mkp, line: 9 +#, sh-format +msgid "only gzip and xz compression implemented" +msgstr "" +# +# File: mkp, line: 10 +#, sh-format +msgid "(the tarball) is expanded, syncing the drive" +msgstr "" +# +# File: mkp, line: 11 +#, sh-format +msgid "Reboot Now" +msgstr "Reinicie ahora" +# +# File: mkp, line: 12 +#, sh-format +msgid "Do you want to reboot into" +msgstr "¿Quieres reiniciar en" +# +# File: mkp, line: 13 +#, sh-format +msgid "Not rebooting" +msgstr "" +# +# File: mkp, line: 14 +#, sh-format +msgid "The installation has finished" +msgstr "La instalación ha terminado" +# +# File: mkp, line: 15 +# File: grub-installer, line: 16 +#, sh-format +msgid "Installing Bootloader" +msgstr "Instalando Bootloader" +# +# File: mkp, line: 17 +#, sh-format +msgid "Extracting:" +msgstr "Extrayendo:" +# +# File: mkp, line: 18 +#, sh-format +msgid "OBI Log File" +msgstr "" +# +# File: mkp, line: 19 +#, sh-format +msgid "Do you want to check the install Log?" +msgstr "¿Desea verificar el registro de instalación?" +# +# File: mkp, line: 21 +#, sh-format +msgid "If unsure choose this device:" +msgstr "Si no está seguro, elija este dispositivo:" +# +#. ########################################################## +# File: mkhome, line: 5 +#, sh-format +msgid "Home partition is not specified, as obi-home" +msgstr "" +# +# File: mkctrl, line: 9 +#, sh-format +msgid "not found or not a file" +msgstr "" +# +# File: mkctrl, line: 10 +#, sh-format +msgid "Trying with the default tarball" +msgstr "" +# +# File: mkctrl, line: 11 +#, sh-format +msgid "No system name specified, using the name of the tarball" +msgstr "" +# +#. ############################################################################ +# File: locale-lister, line: 37 +#, sh-format +msgid "Select Language" +msgstr "Seleccione el idioma" +# +# File: locale-lister, line: 38 +#, sh-format +msgid "Code" +msgstr "Código" +# +# File: locale-lister, line: 39 +#, sh-format +msgid "Name" +msgstr "Nombre" +# +# File: locale-lister, line: 40 +#, sh-format +msgid "Use this Locale:" +msgstr "Use esta configuración regional:" +# +#. ############################################################################ +# File: keyboard-switcher, line: 36 +#, sh-format +msgid "Select Layout" +msgstr "Seleccionar diseño" +# +# File: keyboard-switcher, line: 37 +#, sh-format +msgid "Layout" +msgstr "Diseño" +# +# File: keyboard-switcher, line: 38 +#, sh-format +msgid "Description" +msgstr "Descripción" +# +# File: keyboard-switcher, line: 39 +#, sh-format +msgid "Use This:" +msgstr "Utilizar esta:" +# +# File: keyboard-switcher, line: 40 +#, sh-format +msgid "Model" +msgstr "Modelo" +# +# File: keyboard-switcher, line: 41 +#, sh-format +msgid "Select Model (if unsure use pc105)" +msgstr "Seleccione el modelo (si no está seguro, utilizar pc105)" +# +# File: keyboard-switcher, line: 42 +#, sh-format +msgid "Select Variant (this is optional)" +msgstr "Seleccionar variante (esto es opcional)" +# +# File: keyboard-switcher, line: 43 +#, sh-format +msgid "Variant" +msgstr "Variante" +# +# File: keyboard-switcher, line: 44 +#, sh-format +msgid "Do you want to save your choices?" +msgstr "¿Quieres guardar tus elecciones?" +# +#. ########################################################## +# File: hw-progress, line: 5 +#, sh-format +msgid "Hardware firmware detector" +msgstr "" +# +# File: hw-progress, line: 6 +#, sh-format +msgid "Please Choose a Directory With Firmware Deb files" +msgstr "" +# +#. ########################################################## +#. # filesystem directory will go left of this so change accordingly if text goes right to left +# File: grub-installer, line: 12 +#, sh-format +msgid "a root file system should be mounted on: " +msgstr "" +# +# File: grub-installer, line: 13 +#, sh-format +msgid "Select drive for bootloader" +msgstr "" +# +#. # GRUB is the bootloader, this dialog shows which device the bootloader updated for +# File: grub-installer, line: 15 +#, sh-format +msgid "Updated GRUB for:" +msgstr "" +# +# File: grub-installer, line: 17 +#, sh-format +msgid "unmounted all chroot bound filesystems" +msgstr "" +# +# File: grub-installer, line: 18 +#, sh-format +msgid "Successfully unmounted chroot" +msgstr "" +# +# File: grub-installer, line: 19 +#, sh-format +msgid "Couldn't successfully unmount chroot" +msgstr "" +# +#. ########################################################## +# File: fix-device, line: 9 +#, sh-format +msgid "Checking device:" +msgstr "Comprobando el dispositivo:" +# +# File: fix-device, line: 10 +#, sh-format +msgid "Fix Device" +msgstr "Dispositivo de Reparación" +# +#. ########################################################## +# File: findtbl, line: 5 +#, sh-format +msgid "Found Tarball" +msgstr "" +# +#. ########################################################## +#. # please leave dltbl, this is the program name +# File: dltbl, line: 7 +#, sh-format +msgid "dltbl: cannot download tarballs for" +msgstr "" +# +# File: dltbl, line: 8 +#, sh-format +msgid "Cannot find repository automatically for this distro/version" +msgstr "" +# +#. # ~/tarballs is a directory and should remain as is +# File: dltbl, line: 10 +#, sh-format +msgid "Download/check tarballs manually and move them to ~/tarballs" +msgstr "" +# +#. # Enter key on the keyboard +# File: dltbl, line: 12 +#, sh-format +msgid "Press ENTER to continue" +msgstr "" +# +# File: dltbl, line: 14 +#, sh-format +msgid "to download tarballs" +msgstr "" +# +#. # this is a popup to show that there was an error dowloading a file +# File: dltbl, line: 16 +#, sh-format +msgid "Error downloading:" +msgstr "" +# +# File: dltbl, line: 20 +#, sh-format +msgid "Download tarball" +msgstr "" +# +# File: dltbl, line: 26 +#, sh-format +msgid "No tarball downloaded" +msgstr "" +# +# File: dltbl, line: 27 +#, sh-format +msgid "Downloading" +msgstr "" +# +# File: dltbl, line: 28 +#, sh-format +msgid "Checking md5sum" +msgstr "" +# +# File: dltbl, line: 29 +#, sh-format +msgid "Bad md5sum, try to download the tarball again" +msgstr "" +# +#. # Please leave /tarballs as is. \n is a New Line special character and should remain where appropriate +# File: dltbl, line: 31 +#, sh-format +msgid "" +"Could not write to /tarballs, which is normal in a live session.\\n'Select " +"tarball' can still find the tarball automatically." +msgstr "" +# +#. # this means a keyboard shortcut to choose an item +# File: dltbl, line: 34 +#, sh-format +msgid "Ready To Continue" +msgstr "" +# +# File: dltbl, line: 35 +# File: confirm-partition, line: 89 +#, sh-format +msgid "Check the Result" +msgstr "" +# +# File: dltbl, line: 37 +#, sh-format +msgid "Remove" +msgstr "" +# +# File: confirm-partition, line: 21 +#, sh-format +msgid "Confirm partition" +msgstr "Confirmar partición" +# +#. #These two lines go together around a variable showing the OS name: +#. # Do you want to install OS_VARIABLE ? +#. # so make appropriate punctuation if possible +# File: confirm-partition, line: 25 +#, sh-format +msgid "Do you want to install" +msgstr "¿Quieres instalar" +# +#. # Enter is the keyboard key +# File: confirm-partition, line: 27 +#, sh-format +msgid "Press Enter to quit (return to the main menu)" +msgstr "Presione Enter para salir (regresar al menú principal)" +# +#. # these lines refer to a harddrive being 'mounted' as readable and writable +#. # example: +#. # /dev/sda is mounted +# File: confirm-partition, line: 31 +#, sh-format +msgid "is mounted" +msgstr "" +# +# File: confirm-partition, line: 32 +#, sh-format +msgid "has been unmounted" +msgstr "" +# +# File: confirm-partition, line: 33 +#, sh-format +msgid "was not mounted" +msgstr "" +# +# File: confirm-partition, line: 34 +#, sh-format +msgid "should NOT be mounted." +msgstr "" +# +#. # SWAP is the linux virtual memory space on a harddrive +# File: confirm-partition, line: 36 +#, sh-format +msgid "NO SWAP" +msgstr "" +# +# File: confirm-partition, line: 37 +#, sh-format +msgid "and the swap partition" +msgstr "" +# +#. # the - is a separator mark leave it if it is possible +# File: confirm-partition, line: 41 +#, sh-format +msgid " Swap partition - select or change" +msgstr "Intercambiar partición - seleccionar o cambiar" +# +# File: confirm-partition, line: 42 +#, sh-format +msgid "Quit from this menu (return to the starter menu)" +msgstr "Salga de este menú (regrese al menú de inicio)" +# +# File: confirm-partition, line: 45 +#, sh-format +msgid "Go ahead - confirm the choice" +msgstr "Adelante - confirma la elección" +# +#. # This is the root partition to install the operating system +# File: confirm-partition, line: 47 +#, sh-format +msgid "NO ROOT" +msgstr "" +# +# File: confirm-partition, line: 48 +#, sh-format +msgid " Start selecting a Root partition" +msgstr "" +# +# File: confirm-partition, line: 50 +#, sh-format +msgid "The One Button Installer is prepared to start installing" +msgstr "" +# +# File: confirm-partition, line: 54 +#, sh-format +msgid "the operating system" +msgstr "" +# +# File: confirm-partition, line: 55 +#, sh-format +msgid "to the root partition" +msgstr "" +# +# File: confirm-partition, line: 56 +#, sh-format +msgid "Change or confirm the partitions or quit" +msgstr "" +# +# File: confirm-partition, line: 59 +#, sh-format +msgid "Overview" +msgstr "Visión de conjunto" +# +# File: confirm-partition, line: 62 +#, sh-format +msgid "Autoselect - select root and swap partitions automatically" +msgstr "" +# +# File: confirm-partition, line: 65 +#, sh-format +msgid "Root partition - select or change" +msgstr "" +# +#. #Gparted is a program name. It prepares disk partitions +# File: confirm-partition, line: 69 +#, sh-format +msgid "Tips (How to prepare partitions with Gparted)" +msgstr "" +# +#. # /home is a specific directory on the computer, please leave it in English +# File: confirm-partition, line: 74 +#, sh-format +msgid "Create a separate /home partition" +msgstr "" +# +# File: confirm-partition, line: 75 +#, sh-format +msgid "Change /home partition" +msgstr "" +# +# File: confirm-partition, line: 76 +#, sh-format +msgid "Final WARNING" +msgstr "Última advertencia" +# +#. # leave \\Z1 \\Z7 alone... these make the text more visible in the program Move them if you need to change the wording +# File: confirm-partition, line: 78 +#, sh-format +msgid "\\Z1This is the \\Z7 FINAL WARNING \\Z1 before starting to install !!!" +msgstr "¡¡¡Esta es la \\Z7 FINAL WARNING \\Z1 antes de comenzar a instalar !!!" +# +#. # the \\Zn ends the previous \\Z1 +# File: confirm-partition, line: 80 +#, sh-format +msgid "Do you really want to install and overwrite these partitions?\\Zn" +msgstr "¿Realmente desea instalar y sobrescribir estas particiones?\\Zn" +# +# File: confirm-partition, line: 83 +#, sh-format +msgid "Installing" +msgstr "Instalación" +# +# File: confirm-partition, line: 85 +#, sh-format +msgid "with no swap partition" +msgstr "" +# +# File: confirm-partition, line: 88 +#, sh-format +msgid "" +"to a partition on an internal hard disk drive or external USB or eSATA drive" +msgstr "" +# +# File: confirm-partition, line: 90 +#, sh-format +msgid "Current Install Location:" +msgstr "" +# +# File: confirm-partition, line: 93 +#, sh-format +msgid "Use gparted and show help" +msgstr "" +# +#. # please leave obi-root AND obi-swap in English. Please separate the two lines with \n (the newline character) +# File: confirm-partition, line: 97 +#, sh-format +msgid "" +"No root partition found with obi-root as the label to select automatically." +"\\nNo swap partition found with obi-swap as the label to select " +"automatically." +msgstr "" diff -Nru obi-installer-3.3.0ubuntu0/po/obi-installer.pot obi-installer-3.4.0ubuntu0/po/obi-installer.pot --- obi-installer-3.3.0ubuntu0/po/obi-installer.pot 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/po/obi-installer.pot 2018-03-15 13:13:10.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-01-17 15:04-0600\n" +"POT-Creation-Date: 2018-03-03 20:18-0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -56,32 +56,27 @@ msgstr "" # #. ########################################################## -# File: zmktbl, line: 23 -#, sh-format -msgid "Text not found. Change directory!" -msgstr "" -# -# File: zmktbl, line: 24 +# File: zmktbl, line: 26 #, sh-format msgid "make tarball master menu" msgstr "" # -# File: zmktbl, line: 25 +# File: zmktbl, line: 27 #, sh-format msgid "Select an action (a line) from the list below or use the current value" msgstr "" # -# File: zmktbl, line: 26 +# File: zmktbl, line: 28 #, sh-format msgid "Hotkey:" msgstr "" # -# File: zmktbl, line: 27 +# File: zmktbl, line: 29 #, sh-format msgid "Action: Change ..." msgstr "" # -# File: zmktbl, line: 28 +# File: zmktbl, line: 30 #, sh-format msgid "Current value" msgstr "" @@ -89,41 +84,41 @@ #. # hotkey for "Select tarball to install" #. # Hotkey for: "iso and image file selector (easy), no search for linked files" #. # hotkey pair with " Swap partition - select or change" -# File: zmktbl, line: 31 -# File: starter, line: 35 -# File: functions, line: 43 -# File: confirm-partition, line: 37 +# File: zmktbl, line: 33 +# File: starter, line: 36 +# File: obi-functions, line: 48 +# File: confirm-partition, line: 39 #, sh-format msgid "s" msgstr "" # -# File: zmktbl, line: 32 +# File: zmktbl, line: 34 #, sh-format msgid "Source partition" msgstr "" # #. # hotkey for "Check (and repair) the file system" -# File: zmktbl, line: 33 -# File: starter, line: 51 +# File: zmktbl, line: 35 +# File: starter, line: 52 #, sh-format msgid "c" msgstr "" # -# File: zmktbl, line: 34 +# File: zmktbl, line: 36 #, sh-format msgid "Compression, gzip or xz" msgstr "" # #. # hotkey for 'Tips' #. # hotkey pair with Tips -# File: zmktbl, line: 35 -# File: starter, line: 49 -# File: confirm-partition, line: 65 +# File: zmktbl, line: 37 +# File: starter, line: 50 +# File: confirm-partition, line: 67 #, sh-format msgid "t" msgstr "" # -# File: zmktbl, line: 36 +# File: zmktbl, line: 38 #, sh-format msgid "Target file name with path" msgstr "" @@ -133,179 +128,181 @@ #. # Hotkey for: "Quit" #. # Hotkey for 'Quit' #. # hotkey pair with "Quit" -# File: zmktbl, line: 37 -# File: starter, line: 53 +# File: zmktbl, line: 39 +# File: text-mode-menu, line: 36 +# File: starter, line: 54 # File: select-tarball, line: 12 -# File: functions, line: 24 -# File: dltbl, line: 26 -# File: confirm-partition, line: 50 +# File: obi-functions, line: 29 +# File: dltbl, line: 25 +# File: confirm-partition, line: 52 #, sh-format msgid "q" msgstr "" # -# File: zmktbl, line: 38 -# File: starter, line: 33 -# File: select-part2, line: 15 -# File: obi-readme, line: 5 -# File: functions, line: 25 -# File: dltbl, line: 24 -# File: confirm-partition, line: 51 +# File: zmktbl, line: 40 +# File: text-mode-menu, line: 41 +# File: starter, line: 34 +# File: select-part2, line: 19 +# File: obi-readme, line: 9 +# File: obi-functions, line: 30 +# File: dltbl, line: 23 +# File: confirm-partition, line: 53 #, sh-format msgid "Quit" msgstr "" # -# File: zmktbl, line: 41 +# File: zmktbl, line: 43 #, sh-format msgid "Error in mkmaster" msgstr "" # -# File: zmktbl, line: 42 +# File: zmktbl, line: 44 #, sh-format msgid "select compression" msgstr "" # -# File: zmktbl, line: 43 +# File: zmktbl, line: 45 #, sh-format msgid "TRUE" msgstr "" # -# File: zmktbl, line: 44 +# File: zmktbl, line: 46 #, sh-format msgid "FALSE" msgstr "" # -# File: zmktbl, line: 45 +# File: zmktbl, line: 47 #, sh-format msgid "Click the radio button to select compression" msgstr "" # -# File: zmktbl, line: 46 +# File: zmktbl, line: 48 #, sh-format msgid "Compression" msgstr "" # -# File: zmktbl, line: 47 +# File: zmktbl, line: 49 #, sh-format msgid "make a 'tar.xz' file" msgstr "" # -# File: zmktbl, line: 48 +# File: zmktbl, line: 50 #, sh-format msgid "make a 'tar.gz' file" msgstr "" # -# File: zmktbl, line: 50 +# File: zmktbl, line: 52 #, sh-format -msgid "Error in select-compression" +msgid "Error in select_compression" msgstr "" # -# File: zmktbl, line: 51 +# File: zmktbl, line: 53 #, sh-format msgid "Select target file" msgstr "" # -# File: zmktbl, line: 52 -# File: dltbl, line: 18 +# File: zmktbl, line: 54 +# File: dltbl, line: 17 #, sh-format msgid "There should be enough space for the new tarball" msgstr "" # -# File: zmktbl, line: 53 +# File: zmktbl, line: 55 #, sh-format msgid "Click this if you want to make this tarball" msgstr "" # -# File: zmktbl, line: 54 +# File: zmktbl, line: 56 #, sh-format msgid "Remove some old tarball?" msgstr "" # -# File: zmktbl, line: 56 +# File: zmktbl, line: 58 #, sh-format msgid "" "Remove some old tarball(s) only if necessary, In that case,\\nplease " "continue the dialogue in the zMktbl text console" msgstr "" # -# File: zmktbl, line: 57 +# File: zmktbl, line: 59 #, sh-format msgid "No, continue without removing any tarball" msgstr "" # -# File: zmktbl, line: 58 +# File: zmktbl, line: 60 #, sh-format msgid "Yes, remove some old tarball" msgstr "" # -# File: zmktbl, line: 59 +# File: zmktbl, line: 61 #, sh-format msgid "Click this if you want to remove some old tarball" msgstr "" # -# File: zmktbl, line: 60 +# File: zmktbl, line: 62 #, sh-format msgid "remove old tarballs" msgstr "" # -# File: zmktbl, line: 61 +# File: zmktbl, line: 63 #, sh-format msgid "" "Check the box to select tarballs to remove.\n" "(spaces are replaced with .'. in the list)" msgstr "" # -# File: zmktbl, line: 63 +# File: zmktbl, line: 65 #, sh-format msgid "Old tarballs" msgstr "" # -# File: zmktbl, line: 64 +# File: zmktbl, line: 66 #, sh-format msgid "Click this if you want to remove these old tarballs" msgstr "" # -# File: zmktbl, line: 66 +# File: zmktbl, line: 68 #, sh-format msgid "FINAL WARNING\\nDo you want to make this tarball?" msgstr "" # #. # Enter is the Return (Enter) key on the keyboard #. # Enter is the key on the keyboard -# File: zmktbl, line: 67 -# File: select-device, line: 15 +# File: zmktbl, line: 69 +# File: select-device, line: 17 # File: mktbl, line: 17 -# File: dltbl, line: 33 -# File: confirm-partition, line: 80 +# File: dltbl, line: 32 +# File: confirm-partition, line: 82 #, sh-format msgid "Check the result and press Enter to continue" msgstr "" # #. ########################################################## #. # Usage text -# File: zmktbl, line: 68 +# File: zmktbl, line: 70 # File: select-tarball, line: 5 -# File: select-device, line: 5 -# File: obi, line: 7 +# File: select-device, line: 8 +# File: obi, line: 10 # File: mktbl, line: 18 # File: dltbl, line: 13 -# File: confirm-partition, line: 85 +# File: confirm-partition, line: 87 #, sh-format msgid "Usage" msgstr "" # -# File: zmktbl, line: 71 +# File: zmktbl, line: 73 # File: mktbl, line: 21 #, sh-format msgid "to make a tarball of the files" msgstr "" # -# File: zmktbl, line: 74 +# File: zmktbl, line: 76 # File: mktbl, line: 24 #, sh-format msgid "Partition to be used:" msgstr "" # -# File: zmktbl, line: 76 +# File: zmktbl, line: 78 # File: mktbl, line: 26 #, sh-format msgid "" @@ -313,13 +310,13 @@ "from the tarballs directory\\nto make space for the new tarball" msgstr "" # -# File: zmktbl, line: 77 +# File: zmktbl, line: 79 # File: mktbl, line: 27 #, sh-format msgid "These main commands are prepared:" msgstr "" # -# File: zmktbl, line: 79 +# File: zmktbl, line: 81 #, sh-format msgid "" "Do you want to use -9e compression for the XZ?\\nThis will make the tarball " @@ -327,308 +324,282 @@ msgstr "" # #. ########################################################## -# File: user-config, line: 18 +# File: user-config, line: 21 #, sh-format msgid "Please Contact the Distro maintainer" msgstr "" # -# File: user-config, line: 19 +# File: user-config, line: 22 #, sh-format msgid "Removed old user named" msgstr "" # -# File: user-config, line: 20 +# File: user-config, line: 23 #, sh-format msgid "Removed old group named" msgstr "" # -# File: user-config, line: 21 +# File: user-config, line: 24 #, sh-format msgid "Removing" msgstr "" # -# File: user-config, line: 22 +# File: user-config, line: 25 #, sh-format msgid "Enter your new user's name" msgstr "" # -# File: user-config, line: 23 +# File: user-config, line: 26 #, sh-format msgid "Added" msgstr "" # -# File: user-config, line: 24 +# File: user-config, line: 27 #, sh-format -msgid "One Button Installer - Create Password" +msgid "Create Password" msgstr "" # -# File: user-config, line: 25 +# File: user-config, line: 28 #, sh-format msgid "Create password" msgstr "" # -# File: user-config, line: 26 +# File: user-config, line: 29 #, sh-format msgid "Submit" msgstr "" # #. # Arrod DOWN and TAB are keyboard keys -# File: user-config, line: 28 +# File: user-config, line: 31 #, sh-format msgid "Arrow DOWN for 'Repeat password', TAB for 'Submit'" msgstr "" # -# File: user-config, line: 29 +# File: user-config, line: 32 #, sh-format msgid "Create new password" msgstr "" # -# File: user-config, line: 30 +# File: user-config, line: 33 #, sh-format msgid "Repeat the password" msgstr "" # #. # number 6 -# File: user-config, line: 32 +# File: user-config, line: 35 #, sh-format msgid "too short password, use at least 6 characters" msgstr "" # -# File: user-config, line: 33 +# File: user-config, line: 36 #, sh-format msgid "the password entries match, go ahead ..." msgstr "" # -# File: user-config, line: 34 +# File: user-config, line: 37 #, sh-format msgid "SPACES NOT ALLOWED IN PASSWORDS! Try again, please!" msgstr "" # -# File: user-config, line: 35 +# File: user-config, line: 38 #, sh-format msgid "the passwords do not match, try again" msgstr "" # -# File: user-config, line: 36 +# File: user-config, line: 39 #, sh-format msgid "Groups:" msgstr "" # -# File: user-config, line: 37 +# File: user-config, line: 40 #, sh-format msgid "Auto Login" msgstr "" # -# File: user-config, line: 38 +# File: user-config, line: 41 #, sh-format msgid "Do you want to log your user in automatically?" msgstr "" # -# File: user-config, line: 39 +# File: user-config, line: 42 #, sh-format msgid "Autologin for" msgstr "" # -# File: user-config, line: 40 +# File: user-config, line: 43 #, sh-format msgid "No autologin for" msgstr "" # -# File: user-config, line: 41 +# File: user-config, line: 44 #, sh-format msgid "Computer supports PAE" msgstr "" # #. # PLEASE LEAVE \n this is a NEW LINE character to put the second sentence on a new line #. # PAE is an acronym please leave it as is -# File: user-config, line: 44 +# File: user-config, line: 47 #, sh-format msgid "" "Do you want to install the PAE kernel now?\\n\n" "If you are UNSURE you can always do this later, it is not needed." msgstr "" # -# File: user-config, line: 46 +# File: user-config, line: 49 #, sh-format msgid "Yes install PAE chosen." msgstr "" # -# File: user-config, line: 47 +# File: user-config, line: 50 #, sh-format msgid "set password for" msgstr "" # -# File: user-config, line: 48 +# File: user-config, line: 51 #, sh-format msgid "No install PAE chosen." msgstr "" # #. # CPU is an acronym you can translate it, this is the Central Processing Unit.. or 'Processor' #. # flag in this case is a marker set by the processor internally, this is not a flag on a pole. -# File: user-config, line: 51 +# File: user-config, line: 54 #, sh-format msgid "CPU has no PAE flag" msgstr "" # #. # 64bit is a type of processor architecture -# File: user-config, line: 53 +# File: user-config, line: 56 #, sh-format msgid "64bit processor" msgstr "" # -# File: user-config, line: 54 -#, sh-format -msgid "Information" -msgstr "" -# -# File: user-config, line: 55 +# File: user-config, line: 57 #, sh-format msgid "You might want to consider using a 64bit operating system" msgstr "" # -# File: user-config, line: 56 -#, sh-format -msgid "64bit machine installing 32 bit OS" -msgstr "" -# -# File: user-config, line: 57 +# File: user-config, line: 59 #, sh-format msgid "CPU is not 64bit" msgstr "" # #. # xdg-dirs and gtk-dirs are programs... leave the names as is please -# File: user-config, line: 59 +# File: user-config, line: 61 #, sh-format msgid "updated menus, and xdg-dirs and gtk-dirs" msgstr "" # #. # XDG and GTK do not need to be translated #. # xdg-user-dirs-gtk-update is a program -# File: user-config, line: 62 +# File: user-config, line: 64 #, sh-format msgid "" "Updated menus, and XDG directories but not GTK directories.. xdg-user-dirs-" "gtk-update is not installed" msgstr "" # -# File: user-config, line: 63 -# File: starter, line: 77 -# File: select-part1, line: 17 -# File: functions, line: 13 +# File: user-config, line: 65 +# File: starter, line: 78 +# File: select-part1, line: 20 +# File: obi-functions, line: 18 #, sh-format msgid "WARNING" msgstr "" # #. # lightdm is a program. #. # tarball is a compressed file format -# File: user-config, line: 66 +# File: user-config, line: 68 #, sh-format msgid "LightDm is not installed on the tarball. This may be a software bug." msgstr "" # -# File: user-config, line: 67 +# File: user-config, line: 69 #, sh-format msgid "Set system-wide time to" msgstr "" # -# File: user-config, line: 68 +# File: user-config, line: 70 #, sh-format msgid "Set user's time to" msgstr "" # #. # dpkg-reconfigure is a program -# File: user-config, line: 72 +# File: user-config, line: 74 #, sh-format msgid "dpkg-reconfigure not installed on system (tarball)" msgstr "" # -# File: user-config, line: 73 +# File: user-config, line: 75 #, sh-format msgid "updatedb OR updatedb.mlocate not located on tarball" msgstr "" # #. # chown is a program -# File: user-config, line: 75 +# File: user-config, line: 77 #, sh-format msgid "chown recursivley" msgstr "" # #. # gksu and sudo are programs for giving a user administrator's rights -# File: user-config, line: 77 +# File: user-config, line: 79 #, sh-format msgid "changed gksu to sudo mode for" msgstr "" # -# File: user-config, line: 78 +# File: user-config, line: 80 #, sh-format msgid "Configure Timezone" msgstr "" # -# File: user-config, line: 79 +# File: user-config, line: 81 #, sh-format msgid "Configure Keyboard" msgstr "" # -# File: user-config, line: 80 +# File: user-config, line: 82 #, sh-format msgid "Updating:" msgstr "" # #. ########################################################## -# File: user-config, line: 81 -# File: starter, line: 24 -# File: setlevel, line: 11 -# File: setlevel, line: 13 +# File: user-config, line: 83 +# File: starter, line: 26 # File: select-tarball, line: 14 -# File: select-part2, line: 18 -# File: select-part2, line: 23 -# File: select-part1, line: 21 -# File: select-part1, line: 26 -# File: select-device, line: 11 -# File: partition-help, line: 37 -# File: obi, line: 12 -# File: mkpxpy, line: 10 -# File: mkp2p1, line: 6 -# File: mkp1, line: 9 +# File: select-part2, line: 22 +# File: select-part2, line: 26 +# File: select-part1, line: 24 +# File: select-part1, line: 29 +# File: obi-functions, line: 76 +# File: obi, line: 15 # File: mkp, line: 20 -# File: mkhelp, line: 5 -# File: list_drives, line: 4 -# File: grub-installer, line: 15 -# File: functions, line: 71 -# File: fix-device, line: 6 -# File: dltbl, line: 20 -# File: confirm-partition, line: 18 +# File: hw-progress, line: 7 +# File: dltbl, line: 19 +# File: confirm-partition, line: 20 #, sh-format msgid "One Button Installer" msgstr "" # -# File: user-config, line: 82 +# File: user-config, line: 84 #, sh-format msgid "Installing PAE Kernel" msgstr "" # -# File: user-config, line: 83 -# File: functions, line: 74 -#, sh-format -msgid "Script not found. Change directory" -msgstr "" -# -# File: user-config, line: 84 +# File: user-config, line: 85 #, sh-format msgid "64bit OS doesn't require PAE installation" msgstr "" # -# File: user-config, line: 85 +# File: user-config, line: 86 #, sh-format msgid "Updating the System" msgstr "" # -# File: user-config, line: 86 +# File: user-config, line: 87 #, sh-format msgid "Check for post-release Updates to the System?" msgstr "" # -# File: user-config, line: 87 +# File: user-config, line: 88 #, sh-format msgid "" "Please Note, this operation could take a long time depending on your " @@ -636,301 +607,364 @@ msgstr "" # #. ########################################################## -# File: starter, line: 18 +# File: text-mode-menu, line: 34 #, sh-format -msgid "Error finding the tarball path using" +msgid "PAE flag detected" msgstr "" # -# File: starter, line: 19 -# File: mkctrl, line: 6 +# File: text-mode-menu, line: 35 #, sh-format -msgid "Tarball path" +msgid "No PAE flag found" msgstr "" # -# File: starter, line: 20 +#. # hotkey for "Installer Mode:" +#. # hotkey pair with "Overview" +# File: text-mode-menu, line: 37 +# File: starter, line: 46 +# File: confirm-partition, line: 58 #, sh-format -msgid "OBI text not found. Change directory" +msgid "o" msgstr "" # -# File: starter, line: 21 +#. # hotkey for "Reboot" +#. # hotkey pair with "Root partition - select or change" +# File: text-mode-menu, line: 38 +# File: starter, line: 56 +# File: confirm-partition, line: 64 #, sh-format -msgid "Exit to the Shell" +msgid "r" msgstr "" # -# File: starter, line: 22 +#. # Hotkey for: "General File selector" +#. # hotkey pair with "Go ahead - confirm the choice" +# File: text-mode-menu, line: 39 +# File: obi-functions, line: 54 +# File: confirm-partition, line: 44 #, sh-format -msgid "Close Window" +msgid "g" msgstr "" # -# File: starter, line: 23 +#. # hotkey for "Poweroff" +# File: text-mode-menu, line: 40 +# File: starter, line: 58 +# File: confirm-partition, line: 92 #, sh-format -msgid "to make the tarballs" +msgid "p" msgstr "" # -# File: starter, line: 25 -# File: functions, line: 6 +# File: text-mode-menu, line: 42 #, sh-format -msgid "OK" +msgid "One Button Installer text mode Menu" msgstr "" # -# File: starter, line: 26 +# File: text-mode-menu, line: 43 #, sh-format -msgid "OS to install" +msgid "Please select an alternative with a letter key or the arrow keys" msgstr "" # -# File: starter, line: 27 +# File: text-mode-menu, line: 44 #, sh-format -msgid "Unlabeled OS to install" +msgid "Graphical mode with One Button Installer" msgstr "" # -# File: starter, line: 28 +# File: text-mode-menu, line: 45 #, sh-format -msgid "No tarball selected" +msgid "One Button Installer in text mode (if very low RAM)" msgstr "" # -# File: starter, line: 29 +# File: text-mode-menu, line: 46 #, sh-format -msgid "Had to find a tarball.. OBI found" +msgid "Quit from this menu (exit to the bash shell)" msgstr "" # -# File: starter, line: 30 -# File: mkctrl, line: 13 +# File: text-mode-menu, line: 47 +# File: starter, line: 69 #, sh-format -msgid "Error finding the OBI path" +msgid "Reboot" msgstr "" # -# File: starter, line: 31 +# File: text-mode-menu, line: 48 #, sh-format -msgid "Starter Menu" +msgid "Poweroff" msgstr "" # -# File: starter, line: 32 -# File: functions, line: 40 -# File: confirm-partition, line: 47 +# File: text-mode-menu, line: 49 #, sh-format -msgid "Please select an action with a letter key or the arrow keys" +msgid "Total RAM" msgstr "" # -#. # hotkey for "Partition drives and \Z1Install alongside current OS\Zn" 'used alongside for the a' -#. # Hotkey for: "all files suitable as source files" -#. # hotkey pair with "Autoselect - select root and swap partitions automatically" -# File: starter, line: 37 -# File: functions, line: 53 -# File: confirm-partition, line: 59 +# File: text-mode-menu, line: 50 #, sh-format -msgid "a" +msgid "Used RAM" msgstr "" # -#. # hotkey for "Install" -#. # ISO is a file format for CD images -#. # Hotkey for: "only ISO files" -# File: starter, line: 39 -# File: functions, line: 57 +# File: text-mode-menu, line: 51 #, sh-format -msgid "i" +msgid "text not found. Change directory!" msgstr "" # -#. # hotkey for "Download Tarball" -# File: starter, line: 41 +# File: text-mode-menu, line: 52 #, sh-format -msgid "d" +msgid "It seems you are running inside a graphical environment already" msgstr "" # -#. # hotkey for "Make Tarball" -#. # Hotkey for: "only image files (with and without compression)" -# File: starter, line: 43 -# File: functions, line: 60 +#. ########################################################## +# File: starter, line: 21 +# File: mkctrl, line: 8 #, sh-format -msgid "m" +msgid "Tarball path" msgstr "" # -#. # hotkey for "Installer Mode:" -#. # hotkey pair with "Overview" -# File: starter, line: 45 -# File: confirm-partition, line: 56 +# File: starter, line: 22 #, sh-format -msgid "o" +msgid "OBI text not found. Change directory" msgstr "" # -#. # hotkey for "Help to select drive" -#. # hotkey pair with 'Create a separate /home partition', OR 'Change /home partition' -# File: starter, line: 47 -# File: confirm-partition, line: 70 +# File: starter, line: 23 #, sh-format -msgid "h" +msgid "Exit to the Shell" msgstr "" # -#. # hotkey for "Reboot" -#. # hotkey pair with "Root partition - select or change" -# File: starter, line: 55 -# File: confirm-partition, line: 62 +# File: starter, line: 24 #, sh-format -msgid "r" +msgid "Close Window" msgstr "" # -#. # hotkey for "Poweroff" -# File: starter, line: 57 -# File: confirm-partition, line: 90 +# File: starter, line: 25 #, sh-format -msgid "p" +msgid "to make the tarballs" msgstr "" # -# File: starter, line: 58 -# File: confirm-partition, line: 68 +# File: starter, line: 27 +# File: obi-functions, line: 11 #, sh-format -msgid "Tips (use arrow keys to scroll)" +msgid "OK" +msgstr "" +# +# File: starter, line: 28 +#, sh-format +msgid "OS to install" +msgstr "" +# +# File: starter, line: 29 +#, sh-format +msgid "Unlabeled OS to install" +msgstr "" +# +# File: starter, line: 30 +#, sh-format +msgid "No tarball selected" +msgstr "" +# +# File: starter, line: 31 +#, sh-format +msgid "Had to find a tarball.. OBI found" +msgstr "" +# +# File: starter, line: 32 +#, sh-format +msgid "Starter Menu" +msgstr "" +# +# File: starter, line: 33 +# File: obi-functions, line: 45 +# File: confirm-partition, line: 49 +#, sh-format +msgid "Please select an action with a letter key or the arrow keys" +msgstr "" +# +#. # hotkey for "Partition drives and \Z1Install alongside current OS\Zn" 'used alongside for the a' +#. # Hotkey for: "all files suitable as source files" +#. # hotkey pair with "Autoselect - select root and swap partitions automatically" +# File: starter, line: 38 +# File: obi-functions, line: 58 +# File: confirm-partition, line: 61 +#, sh-format +msgid "a" +msgstr "" +# +#. # hotkey for "Install" +#. # ISO is a file format for CD images +#. # Hotkey for: "only ISO files" +# File: starter, line: 40 +# File: obi-functions, line: 62 +#, sh-format +msgid "i" +msgstr "" +# +#. # hotkey for "Download Tarball" +# File: starter, line: 42 +#, sh-format +msgid "d" +msgstr "" +# +#. # hotkey for "Make Tarball" +#. # Hotkey for: "only image files (with and without compression)" +# File: starter, line: 44 +# File: obi-functions, line: 65 +#, sh-format +msgid "m" +msgstr "" +# +#. # hotkey for "Help to select drive" +#. # hotkey pair with 'Create a separate /home partition', OR 'Change /home partition' +# File: starter, line: 48 +# File: confirm-partition, line: 72 +#, sh-format +msgid "h" msgstr "" # # File: starter, line: 59 +# File: confirm-partition, line: 70 #, sh-format -msgid "Select tarball to install" +msgid "Tips (use arrow keys to scroll)" msgstr "" # -#. # please leave \Z1 and \Zn these make the text bold -# File: starter, line: 61 +# File: starter, line: 60 #, sh-format -msgid "Partition drives and \\Z1Install alongside current OS\\Zn" +msgid "Select tarball to install" msgstr "" # +#. # please leave \Z1 and \Zn these make the text bold # File: starter, line: 62 #, sh-format -msgid "Download Tarball" +msgid "Partition drives and \\Z1Install alongside current OS\\Zn" msgstr "" # # File: starter, line: 63 #, sh-format -msgid "Make Tarball" +msgid "Download Tarball" msgstr "" # # File: starter, line: 64 #, sh-format -msgid "Help to select drive" +msgid "Make Tarball" msgstr "" # # File: starter, line: 65 #, sh-format -msgid "Tips" +msgid "Help to select drive" msgstr "" # # File: starter, line: 66 #, sh-format -msgid "Check (and repair) the file system" +msgid "Tips" msgstr "" # # File: starter, line: 67 #, sh-format -msgid "Quit from this menu" +msgid "Check (and repair) the file system" msgstr "" # # File: starter, line: 68 #, sh-format -msgid "Reboot" +msgid "Quit from this menu" msgstr "" # -# File: starter, line: 69 +# File: starter, line: 70 #, sh-format msgid "Power Off" msgstr "" # -# File: starter, line: 70 -# File: confirm-partition, line: 93 +# File: starter, line: 71 +# File: confirm-partition, line: 95 #, sh-format msgid "Install" msgstr "" # #. # SPLASH SCREEN TEXT -# File: starter, line: 72 +# File: starter, line: 73 #, sh-format msgid "Welcome and Warning" msgstr "" # -# File: starter, line: 73 +# File: starter, line: 74 #, sh-format msgid "Welcome" msgstr "" # #. # These Lines until END will be a paragraph, modify them as you need to #. # please leave \Z1 and \Zn these make the text bold so make 'risky' BOLD -# File: starter, line: 76 +# File: starter, line: 77 #, sh-format msgid "Installing an operating system is a \\Z1risky\\Zn operation." msgstr "" # #. # please leave \Z1 and \Zn these make the text bold -# File: starter, line: 79 +# File: starter, line: 80 #, sh-format msgid "\\Z1Copy the data you want to keep to another device\\Zn, for example:" msgstr "" # -# File: starter, line: 80 +# File: starter, line: 81 #, sh-format msgid "an external hard disk drive or a cloud service! Otherwise," msgstr "" # -# File: starter, line: 81 +# File: starter, line: 82 #, sh-format msgid "there might be no easy way to recover any previous data." msgstr "" # -# File: starter, line: 82 +# File: starter, line: 83 #, sh-format msgid "Expensive intelligence services might restore some data." msgstr "" # -# File: starter, line: 83 +# File: starter, line: 84 #, sh-format msgid "If you use the BASIC installer the target device will be" msgstr "" # -# File: starter, line: 84 +# File: starter, line: 85 #, sh-format msgid "COMPLETELY OVERWRITTEN" msgstr "" # -# File: starter, line: 85 +# File: starter, line: 86 #, sh-format msgid "If you want to keep an installed operating system," msgstr "" # #. # The line after this is the same as: Partition drives and \Z1Install alongside current OS\Zn #. # this line is the END -# File: starter, line: 88 +# File: starter, line: 89 #, sh-format msgid "make sure to use the option" msgstr "" # #. # Splash as in 'Splash Screen' -# File: starter, line: 90 +# File: starter, line: 91 #, sh-format msgid "Splash" msgstr "" # -# File: starter, line: 91 +# File: starter, line: 92 #, sh-format msgid "Is this a tarball you want to use:" msgstr "" # -# File: starter, line: 92 +# File: starter, line: 93 #, sh-format msgid "Installer Mode:" msgstr "" # -# File: starter, line: 93 +# File: starter, line: 94 # File: setlevel, line: 7 #, sh-format msgid "basic" msgstr "" # -# File: starter, line: 94 +# File: starter, line: 95 # File: setlevel, line: 8 #, sh-format msgid "advanced" msgstr "" # -# File: starter, line: 95 -# File: functions, line: 68 -# File: dltbl, line: 37 -# File: confirm-partition, line: 92 +# File: starter, line: 96 +# File: obi-functions, line: 73 +# File: dltbl, line: 36 +# File: confirm-partition, line: 94 #, sh-format msgid "Hotkey" msgstr "" @@ -956,8 +990,7 @@ msgid "Partitions are selected and used" msgstr "" # -# File: setlevel, line: 12 -# File: select-part2, line: 19 +# File: setlevel, line: 11 #, sh-format msgid "Select OBI level" msgstr "" @@ -974,7 +1007,7 @@ # #. # \n is a newline character please leave to separate lines # File: select-tarball, line: 9 -# File: dltbl, line: 22 +# File: dltbl, line: 21 #, sh-format msgid "Please select a tarball with the arrow keys, scroll if necessary" msgstr "" @@ -985,7 +1018,7 @@ msgstr "" # # File: select-tarball, line: 13 -# File: dltbl, line: 23 +# File: dltbl, line: 22 #, sh-format msgid "Available tarballs" msgstr "" @@ -1035,194 +1068,170 @@ msgid "No tarball found (tarballs/filename.tar.gz)" msgstr "" # -# File: select-tarball, line: 26 -# File: functions, line: 73 -#, sh-format -msgid "Error finding the OBI selected path" -msgstr "" -# -#. ########################################################## -# File: select-tarball, line: 27 -# File: mkp, line: 7 -# File: mkctrl, line: 5 -#, sh-format -msgid "Error finding the tarball path" -msgstr "" -# #. ############################### -# File: select-part2, line: 10 +# File: select-part2, line: 14 #, sh-format msgid "This device mounted and cannot be unmounted:" msgstr "" # -# File: select-part2, line: 11 +# File: select-part2, line: 15 #, sh-format msgid "You must stop the program locking it " msgstr "" # -# File: select-part2, line: 12 +# File: select-part2, line: 16 #, sh-format msgid "Select partition using this key:" msgstr "" # -# File: select-part2, line: 13 +# File: select-part2, line: 17 #, sh-format msgid "Partition:" msgstr "" # -# File: select-part2, line: 14 +# File: select-part2, line: 18 #, sh-format msgid "Select Partition:" msgstr "" # #. ##################################################### -# File: select-part2, line: 16 -# File: select-part1, line: 16 +# File: select-part2, line: 20 +# File: select-part1, line: 19 #, sh-format msgid "Usage:" msgstr "" # -# File: select-part2, line: 17 +# File: select-part2, line: 21 #, sh-format msgid "Select partition for the advanced Installer level" msgstr "" # -# File: select-part2, line: 20 +# File: select-part2, line: 23 #, sh-format msgid "Examples:" msgstr "" # -# File: select-part2, line: 21 +# File: select-part2, line: 24 #, sh-format msgid "scroll if necessary " msgstr "" # -# File: select-part2, line: 22 +# File: select-part2, line: 25 #, sh-format msgid "You must select a root partition" msgstr "" # -# File: select-part2, line: 24 +# File: select-part2, line: 27 #, sh-format msgid "NAME" msgstr "" # -# File: select-part2, line: 25 +# File: select-part2, line: 28 #, sh-format msgid "SIZE" msgstr "" # -# File: select-part2, line: 26 -#, sh-format -msgid "TYPE" -msgstr "" -# -# File: select-part2, line: 27 +# File: select-part2, line: 30 #, sh-format msgid "FSTYPE" msgstr "" # -# File: select-part2, line: 28 +# File: select-part2, line: 31 #, sh-format msgid "LABEL" msgstr "" # -# File: select-part2, line: 29 +# File: select-part2, line: 32 #, sh-format msgid "MOUNTPOINT" msgstr "" # #. #paired with No_swap -# File: select-part2, line: 31 +# File: select-part2, line: 34 #, sh-format msgid "n" msgstr "" # #. #please do not put spaces in this!!! -# File: select-part2, line: 33 +# File: select-part2, line: 36 #, sh-format msgid "No_swap" msgstr "" # -# File: select-part1, line: 18 +# File: select-part1, line: 21 #, sh-format msgid "the partitions will be completely overwritten" msgstr "" # -# File: select-part1, line: 19 +# File: select-part1, line: 22 #, sh-format msgid "Get more help to select device at the Starter menu" msgstr "" # -# File: select-part1, line: 20 +# File: select-part1, line: 23 #, sh-format msgid "Unmount the target partitions if mounted" msgstr "" # -# File: select-part1, line: 22 +# File: select-part1, line: 25 #, sh-format msgid "Select partition" msgstr "" # -# File: select-part1, line: 23 -# File: select-device, line: 6 +# File: select-part1, line: 26 +# File: select-device, line: 9 #, sh-format msgid "Install:" msgstr "" # #. # \n is a newline character please leave to separate lines -# File: select-part1, line: 24 -# File: select-device, line: 10 +# File: select-part1, line: 27 +# File: select-device, line: 13 #, sh-format msgid "" "Install to a mass storage device, typically an\\ninternal hard disk drive or " "external USB or eSATA drive" msgstr "" # -# File: select-part1, line: 25 -#, sh-format -msgid "No extra parameters" -msgstr "" -# -# File: select-device, line: 7 +# File: select-device, line: 10 #, sh-format msgid "Installing:" msgstr "" # -# File: select-device, line: 8 +# File: select-device, line: 11 #, sh-format msgid "Target:" msgstr "" # -# File: select-device, line: 12 -# File: functions, line: 8 +# File: select-device, line: 14 +# File: obi-functions, line: 13 #, sh-format msgid "Select device" msgstr "" # -# File: select-device, line: 13 +# File: select-device, line: 15 #, sh-format msgid "Do you want to install:" msgstr "" # -# File: select-device, line: 16 +# File: select-device, line: 18 #, sh-format msgid "Check the result" msgstr "" # -# File: select-device, line: 17 +# File: select-device, line: 19 #, sh-format msgid "Choose the drive to install to:" msgstr "" # #. ########################################################## #. # \n is a new line character please leave alone -# File: partition-help, line: 12 +# File: partition-help, line: 15 #, sh-format msgid "Error finding the OBI path.\\nEXITING IMMEDIATELY" msgstr "" # -# File: partition-help, line: 13 +# File: partition-help, line: 16 #, sh-format msgid "" "You can install a system from a tarball into two partitions:\\n\\n one root " @@ -1234,22 +1243,22 @@ "NTFS is usable by OSX through 3rd party apps.\\n\\n" msgstr "" # -# File: partition-help, line: 14 +# File: partition-help, line: 17 #, sh-format msgid "OBI detects" msgstr "" # -# File: partition-help, line: 15 +# File: partition-help, line: 18 #, sh-format msgid "device" msgstr "" # -# File: partition-help, line: 16 +# File: partition-help, line: 19 #, sh-format msgid "devices" msgstr "" # -# File: partition-help, line: 17 +# File: partition-help, line: 20 #, sh-format msgid "" "NOTE: If you do not wish to hibernate/suspend you can use 1G (or less) for " @@ -1257,694 +1266,679 @@ msgstr "" # #. # please leave ${redtext} ${greentext} ${resetvid} in place -# File: partition-help, line: 19 +# File: partition-help, line: 22 #, sh-format msgid "Edit and create partitions" msgstr "" # #. # this is used in a tabbed chart to show the disk drive device name and size \t is the TAB character leave it alone please -# File: partition-help, line: 23 +# File: partition-help, line: 26 #, sh-format msgid "For example: \\n The drive \\t Size" msgstr "" # -# File: partition-help, line: 25 +# File: partition-help, line: 28 #, sh-format msgid "You have existing SWAP partition(s) here:" msgstr "" # -# File: partition-help, line: 26 +# File: partition-help, line: 29 #, sh-format msgid "" "NOTE, if you want to hibernate your SWAP should be somewhat larger than your " "RAM" msgstr "" # -# File: partition-help, line: 27 +# File: partition-help, line: 30 #, sh-format msgid "Help to partition" msgstr "" # -# File: partition-help, line: 28 +# File: partition-help, line: 31 #, sh-format msgid "" "No Root partition made with the label obi-root\\nDo you want to try again?" msgstr "" # -# File: partition-help, line: 29 +# File: partition-help, line: 32 #, sh-format msgid "Use Gparted and prepare the device for the installer in the next step" msgstr "" # #. # please leave obi-root as is -# File: partition-help, line: 32 +# File: partition-help, line: 35 #, sh-format msgid "1. Put the label obi-root to one partition and format it to FAT32" msgstr "" # #. # please leave obi-swap in this as is -# File: partition-help, line: 34 +# File: partition-help, line: 37 #, sh-format msgid "2. Put the label obi-swap to one partition and format it to FAT32" msgstr "" # -# File: partition-help, line: 35 +# File: partition-help, line: 38 #, sh-format msgid "(It is fast to format to FAT32, and it will be overwritten by the OBI)" msgstr "" # -# File: partition-help, line: 36 +# File: partition-help, line: 39 #, sh-format msgid "*. The other partitions 'can be anything else'" msgstr "" # -# File: obi-readme, line: 4 +#. ########################################################## +# File: obi-readme, line: 8 #, sh-format msgid "Help" msgstr "" # -# File: obi-readme, line: 6 +# File: obi-readme, line: 10 #, sh-format msgid "Quick Start Guide" msgstr "" # -# File: obi-readme, line: 7 +# File: obi-readme, line: 11 #, sh-format msgid "Detailed Help" msgstr "" # -# File: obi-readme, line: 8 +# File: obi-readme, line: 12 #, sh-format msgid "About OBI" msgstr "" # -# File: obi-readme, line: 9 +# File: obi-readme, line: 13 #, sh-format msgid "Learn more about the One Button Installer" msgstr "" # #. ########################################################## -# File: obi, line: 5 +# File: obi-functions, line: 8 +# File: mktbl, line: 29 #, sh-format -msgid "Run this as ROOT" +msgid "Press Enter to continue" msgstr "" # -# File: obi, line: 6 +# File: obi-functions, line: 9 #, sh-format -msgid "Install operating system with the One Button Installer" +msgid "Error finding the tarball path so it was made at" msgstr "" # -# File: obi, line: 8 +# File: obi-functions, line: 10 #, sh-format -msgid "Selected Tarball" +msgid "Help info to select drive" msgstr "" # -# File: obi, line: 9 +# File: obi-functions, line: 12 #, sh-format -msgid "selecting" +msgid "Use Arrow PgUp PgDn Home End keys to scroll this help info" msgstr "" # -# File: obi, line: 10 -# File: confirm-partition, line: 82 +# File: obi-functions, line: 14 #, sh-format -msgid "with swap" +msgid "warning and overview" msgstr "" # -# File: obi, line: 11 +#. # please leave \n and \Zn and \Z1 \n is a new line, \Z1 and \Zn make text BOLD +# File: obi-functions, line: 16 #, sh-format -msgid "without swap" +msgid "You NEED to choose a device for the bootloader" msgstr "" # -# File: obi, line: 13 +# File: obi-functions, line: 17 #, sh-format -msgid "Progress" +msgid "" +": the device will be completely overwritten\\Zn\\nGet more help to select " +"device at the Starter menu\\n\\Z1Unmount the target device if mounted" msgstr "" # -#. ########################################################## -#. please leave zMktbl as is, also \n is the newline character -# File: mktbl, line: 16 -# File: dltbl, line: 19 +#. # HotKey for: "toggle USB-only" +# File: obi-functions, line: 20 #, sh-format -msgid "Remove some old tarball(s) only if necessary" +msgid "u" msgstr "" # -# File: mktbl, line: 28 +# File: obi-functions, line: 21 #, sh-format -msgid "Do you want to continue?" +msgid "toggle USB-only" msgstr "" # -# File: mktbl, line: 29 -# File: mkctrl, line: 8 +# File: obi-functions, line: 22 #, sh-format -msgid "Press Enter to continue" +msgid "show all drives" msgstr "" # -# File: mktbl, line: 30 +# File: obi-functions, line: 23 #, sh-format -msgid "Default" +msgid "hide other drives" msgstr "" # -# File: mktbl, line: 31 +# File: obi-functions, line: 24 #, sh-format -msgid "compression" +msgid "quit installing" msgstr "" # -# File: mktbl, line: 32 +# File: obi-functions, line: 25 #, sh-format -msgid "filename" +msgid "and continue" msgstr "" # -# File: mktbl, line: 33 +# File: obi-functions, line: 26 #, sh-format -msgid "source partition" +msgid "Please select a device with the arrow keys, scroll if necessary" msgstr "" # -# File: mktbl, line: 34 +# File: obi-functions, line: 27 #, sh-format -msgid "destination" +msgid "Go" msgstr "" # -# File: mktbl, line: 35 +# File: obi-functions, line: 31 #, sh-format -msgid "Example" +msgid "wiping" msgstr "" # -# File: mktbl, line: 36 +#. # please leave \n this is a new line character +# File: obi-functions, line: 33 #, sh-format -msgid "The file extension tar.xz or tar.gz is added automatically" +msgid "installing\\n\\nthe operating system" msgstr "" # -# File: mktbl, line: 37 +# File: obi-functions, line: 34 #, sh-format -msgid "Run from bash if not default" +msgid "FINAL WARNING" msgstr "" # -# File: mktbl, line: 38 +# File: obi-functions, line: 35 #, sh-format msgid "" -"The default is xz compression because it is often 20% or more\\nefficient " -"(smaller files) compared to gzip for gz files." -msgstr "" -# -# File: mktbl, line: 39 -#, sh-format -msgid "tarball finished, syncing now ..." -msgstr "" -# -#. ########################################################## -# File: mkpxpy, line: 5 -# File: mkp2p1, line: 5 -# File: mkp1, line: 5 -#, sh-format -msgid "mount of what should become the root partition failed" -msgstr "" -# -# File: mkpxpy, line: 6 -#, sh-format -msgid "Use existing swap partition" +"before wiping and installing !!!\\nDo you really want to wipe and install to " +"this device?" msgstr "" # -# File: mkpxpy, line: 7 +#. #SPACEBAR and SLASH are keyboard keys +# File: obi-functions, line: 37 #, sh-format -msgid "keep its UUID" +msgid "" +"SPACEBAR: copy selection to text-entry box, SLASH: show directory content" msgstr "" # -# File: mkpxpy, line: 8 +# File: obi-functions, line: 38 #, sh-format -msgid "Make a swap partition" +msgid "Select source file" msgstr "" # -# File: mkpxpy, line: 9 +# File: obi-functions, line: 39 #, sh-format -msgid "and get new UUID" +msgid "normal, file type filter" msgstr "" # -#. # please leave swap and /mnt/etc/fstab -# File: mkp1, line: 7 +# File: obi-functions, line: 40 #, sh-format -msgid "swap partitions in /mnt/etc/fstab, should be 0 for the OBI" +msgid "Find and select among iso and image files, or with a general selector." msgstr "" # -#. ########################################################## -# File: mkp, line: 5 -# File: confirm-partition, line: 17 +#. # please leave \n and \Zn and \Z1 \n is a new line, \Z1 and \Zn make text BOLD +# File: obi-functions, line: 42 #, sh-format -msgid "Script not found. Change directory!" +msgid "" +"Increase the size of the terminal window, particularly the width!\\Zn\\nThen " +"the menus to 'select file' work better to show long file names.\\n\\n" +"\\Z1Avoid spaces and special characters in directory and file names!" msgstr "" # -# File: mkp, line: 6 +#. # please leave \n and \Zn and \Z1 \n is a new line, \Z1 and \Zn make text BOLD +# File: obi-functions, line: 44 #, sh-format -msgid "Disk is smaller than" +msgid "" +"Avoid spaces and special characters in directory and file names!\\Zn\\nUse a " +"high resolution screen, if possible more than 80 characters wide!\\nThen the " +"menus to 'select file' work better to show long file names.\\n\\n\\Z1Type " +"text in the bottom text box!\\Zn Use the upper text box(es) only to\\npaste " +"text into the bottom window (with the space key). The slash key\\ncan be " +"used to 'finish' moving to another directory." msgstr "" # -# File: mkp, line: 8 +# File: obi-functions, line: 46 #, sh-format -msgid "only gzip and xz compression implemented" +msgid "iso and image file selector (easy), no search for linked files" msgstr "" # -# File: mkp, line: 9 +# File: obi-functions, line: 49 #, sh-format -msgid "(the tarball) is expanded, syncing the drive" +msgid "iso and image file selector (easy), include Linked files (may fail)" msgstr "" # -# File: mkp, line: 10 +#. # Hotkey for: "iso and image file selector (easy), include Linked files (may fail)" +# File: obi-functions, line: 51 #, sh-format -msgid "Reboot Now" +msgid "l" msgstr "" # -# File: mkp, line: 11 +# File: obi-functions, line: 52 #, sh-format -msgid "Do you want to reboot into" +msgid "General File selector" msgstr "" # -# File: mkp, line: 12 +# File: obi-functions, line: 55 #, sh-format -msgid "Not rebooting" +msgid "" +"Among files in the previously selected directory tree,\\nselect file type to " +"display" msgstr "" # -# File: mkp, line: 13 +# File: obi-functions, line: 56 #, sh-format -msgid "The installation has finished" +msgid "Select file type to display" msgstr "" # -# File: mkp, line: 14 -# File: grub-installer, line: 13 +# File: obi-functions, line: 59 #, sh-format -msgid "Installing Bootloader" +msgid "all files suitable as source files" msgstr "" # -# File: mkp, line: 16 +# File: obi-functions, line: 63 #, sh-format -msgid "Extracting:" +msgid "only ISO files" msgstr "" # -# File: mkp, line: 17 +# File: obi-functions, line: 66 #, sh-format -msgid "OBI Log File" +msgid "only image files (with and without compression)" msgstr "" # -# File: mkp, line: 18 +# File: obi-functions, line: 67 #, sh-format -msgid "Do you want to check the install Log?" +msgid "Do you want to install it?" msgstr "" # -# File: mkp, line: 19 +# File: obi-functions, line: 68 #, sh-format -msgid "MISSING" +msgid "The program 'pv' can show the progress during the installation." msgstr "" # -# File: mkp, line: 21 +# File: obi-functions, line: 69 #, sh-format -msgid "If unsure choose this device:" +msgid "Prepare by making the system up to date" msgstr "" # -#. ########################################################## -# File: mkhome, line: 5 +# File: obi-functions, line: 70 #, sh-format -msgid "Home partition is not specified, as obi-home" +msgid "however, it is not installed." msgstr "" # -# File: mkctrl, line: 7 +# File: obi-functions, line: 71 #, sh-format -msgid "not found or not a file" +msgid "Booted from" msgstr "" # -# File: mkctrl, line: 9 +# File: obi-functions, line: 72 #, sh-format -msgid "Trying with the default tarball" +msgid "Available devices" msgstr "" # -# File: mkctrl, line: 10 +# File: obi-functions, line: 74 #, sh-format -msgid "Selected" +msgid "The target device will be:" msgstr "" # -# File: mkctrl, line: 11 +# File: obi-functions, line: 75 #, sh-format -msgid "No system name specified, using the name of the tarball" +msgid "Target Device:" msgstr "" # -# File: mkctrl, line: 12 +# File: obi-functions, line: 77 +# File: confirm-partition, line: 91 #, sh-format -msgid "OBI directory" +msgid "Click this if you are ready to go" msgstr "" # -#. ############################################################################ -# File: locale-lister, line: 37 +# File: obi-functions, line: 78 #, sh-format -msgid "Select Language" +msgid "Error finding the OBI selected path" msgstr "" # -# File: locale-lister, line: 38 +# File: obi-functions, line: 79 #, sh-format -msgid "Code" +msgid "Script not found. Change directory" msgstr "" # -# File: locale-lister, line: 39 +#. ########################################################## +# File: obi, line: 8 #, sh-format -msgid "Name" +msgid "Run this as ROOT" msgstr "" # -# File: locale-lister, line: 40 +# File: obi, line: 9 #, sh-format -msgid "Use this Locale:" +msgid "Install operating system with the One Button Installer" msgstr "" # -#. ############################################################################ -# File: keyboard-switcher, line: 36 +# File: obi, line: 11 #, sh-format -msgid "Select Layout" +msgid "Selected Tarball" msgstr "" # -# File: keyboard-switcher, line: 37 +# File: obi, line: 12 #, sh-format -msgid "Layout" +msgid "selecting" msgstr "" # -# File: keyboard-switcher, line: 38 +# File: obi, line: 13 +# File: confirm-partition, line: 84 #, sh-format -msgid "Description" +msgid "with swap" msgstr "" # -# File: keyboard-switcher, line: 39 +# File: obi, line: 14 #, sh-format -msgid "Use This:" +msgid "without swap" msgstr "" # -# File: keyboard-switcher, line: 40 +# File: obi, line: 16 #, sh-format -msgid "Model" +msgid "Progress" msgstr "" # -# File: keyboard-switcher, line: 41 +#. ########################################################## +#. please leave zMktbl as is, also \n is the newline character +# File: mktbl, line: 16 +# File: dltbl, line: 18 #, sh-format -msgid "Select Model" +msgid "Remove some old tarball(s) only if necessary" msgstr "" # -# File: keyboard-switcher, line: 42 +# File: mktbl, line: 28 #, sh-format -msgid "Select Variant" +msgid "Do you want to continue?" msgstr "" # -# File: keyboard-switcher, line: 43 +# File: mktbl, line: 30 #, sh-format -msgid "Variant" +msgid "Default" msgstr "" # -# File: keyboard-switcher, line: 44 +# File: mktbl, line: 31 #, sh-format -msgid "Do you want to save your choices?" +msgid "compression" msgstr "" # -#. ########################################################## -# File: hw-progress, line: 5 +# File: mktbl, line: 32 #, sh-format -msgid "Hardware firmware detector" +msgid "filename" msgstr "" # -# File: hw-progress, line: 6 +# File: mktbl, line: 33 #, sh-format -msgid "Please Choose a Directory With Firmware Deb files" +msgid "source partition" msgstr "" # -#. ########################################################## -#. # filesystem directory will go left of this so change accordingly if text goes right to left -# File: grub-installer, line: 9 +# File: mktbl, line: 34 #, sh-format -msgid "a root file system should be mounted on: " +msgid "destination" msgstr "" # -# File: grub-installer, line: 10 +# File: mktbl, line: 35 #, sh-format -msgid "Select drive for bootloader" +msgid "Example" msgstr "" # -#. # GRUB is the bootloader, this dialog shows which device the bootloader updated for -# File: grub-installer, line: 12 +# File: mktbl, line: 36 #, sh-format -msgid "Updated GRUB for:" +msgid "The file extension tar.xz or tar.gz is added automatically" msgstr "" # -# File: grub-installer, line: 14 +# File: mktbl, line: 37 #, sh-format -msgid "unmounted all chroot bound filesystems" +msgid "Run from bash if not default" msgstr "" # -# File: grub-installer, line: 16 +# File: mktbl, line: 38 #, sh-format -msgid "Successfully unmounted chroot" +msgid "" +"The default is xz compression because it is often 20% or more\\nefficient " +"(smaller files) compared to gzip for gz files." msgstr "" # -# File: grub-installer, line: 17 +# File: mktbl, line: 39 #, sh-format -msgid "Couldn't successfully unmount chroot" +msgid "tarball finished, syncing now ..." msgstr "" # #. ########################################################## -# File: functions, line: 5 +# File: mkpxpy, line: 8 +# File: mkp2p1, line: 9 +# File: mkp1, line: 9 +# File: mkp, line: 22 #, sh-format -msgid "Help info to select drive" +msgid "mount of what should become the root partition failed" msgstr "" # -# File: functions, line: 7 +# File: mkpxpy, line: 9 +# File: mkp, line: 23 #, sh-format -msgid "Use Arrow PgUp PgDn Home End keys to scroll this help info" +msgid "Use existing swap partition" msgstr "" # -# File: functions, line: 9 +# File: mkpxpy, line: 10 +# File: mkp, line: 24 #, sh-format -msgid "warning and overview" +msgid "keep its UUID" msgstr "" # -#. # please leave \n and \Zn and \Z1 \n is a new line, \Z1 and \Zn make text BOLD -# File: functions, line: 11 +# File: mkpxpy, line: 11 +# File: mkp, line: 25 #, sh-format -msgid "You NEED to choose a device for the bootloader" +msgid "Make a swap partition" msgstr "" # -# File: functions, line: 12 +# File: mkpxpy, line: 12 +# File: mkp, line: 26 #, sh-format -msgid "" -": the device will be completely overwritten\\Zn\\nGet more help to select " -"device at the Starter menu\\n\\Z1Unmount the target device if mounted" +msgid "and get new UUID" msgstr "" # -#. # HotKey for: "toggle USB-only" -# File: functions, line: 15 +#. ########################################################## +# File: mkp, line: 8 #, sh-format -msgid "u" +msgid "Disk is smaller than" msgstr "" # -# File: functions, line: 16 +# File: mkp, line: 9 #, sh-format -msgid "toggle USB-only" +msgid "only gzip and xz compression implemented" msgstr "" # -# File: functions, line: 17 +# File: mkp, line: 10 #, sh-format -msgid "show all drives" +msgid "(the tarball) is expanded, syncing the drive" msgstr "" # -# File: functions, line: 18 +# File: mkp, line: 11 #, sh-format -msgid "hide other drives" +msgid "Reboot Now" msgstr "" # -# File: functions, line: 19 +# File: mkp, line: 12 #, sh-format -msgid "quit installing" +msgid "Do you want to reboot into" msgstr "" # -# File: functions, line: 20 +# File: mkp, line: 13 #, sh-format -msgid "and continue" +msgid "Not rebooting" msgstr "" # -# File: functions, line: 21 +# File: mkp, line: 14 #, sh-format -msgid "Please select a device with the arrow keys, scroll if necessary" +msgid "The installation has finished" msgstr "" # -# File: functions, line: 22 +# File: mkp, line: 15 +# File: grub-installer, line: 16 #, sh-format -msgid "Go" +msgid "Installing Bootloader" msgstr "" # -# File: functions, line: 26 +# File: mkp, line: 17 #, sh-format -msgid "wiping" +msgid "Extracting:" msgstr "" # -#. # please leave \n this is a new line character -# File: functions, line: 28 +# File: mkp, line: 18 #, sh-format -msgid "installing\\n\\nthe operating system" +msgid "OBI Log File" msgstr "" # -# File: functions, line: 29 +# File: mkp, line: 19 #, sh-format -msgid "FINAL WARNING" +msgid "Do you want to check the install Log?" msgstr "" # -# File: functions, line: 30 +# File: mkp, line: 21 #, sh-format -msgid "" -"before wiping and installing !!!\\nDo you really want to wipe and install to " -"this device?" +msgid "If unsure choose this device:" msgstr "" # -#. #SPACEBAR and SLASH are keyboard keys -# File: functions, line: 32 +# File: mkp, line: 27 #, sh-format -msgid "" -"SPACEBAR: copy selection to text-entry box, SLASH: show directory content" +msgid "Formatting:" msgstr "" # -# File: functions, line: 33 +# File: mkctrl, line: 9 #, sh-format -msgid "Select source file" +msgid "not found or not a file" msgstr "" # -# File: functions, line: 34 +# File: mkctrl, line: 10 #, sh-format -msgid "normal, file type filter" +msgid "Trying with the default tarball" msgstr "" # -# File: functions, line: 35 +# File: mkctrl, line: 11 #, sh-format -msgid "Find and select among iso and image files, or with a general selector." +msgid "No system name specified, using the name of the tarball" msgstr "" # -#. # please leave \n and \Zn and \Z1 \n is a new line, \Z1 and \Zn make text BOLD -# File: functions, line: 37 +#. ############################################################################ +# File: locale-lister, line: 37 #, sh-format -msgid "" -"Increase the size of the terminal window, particularly the width!\\Zn\\nThen " -"the menus to 'select file' work better to show long file names.\\n\\n" -"\\Z1Avoid spaces and special characters in directory and file names!" +msgid "Select Language" msgstr "" # -#. # please leave \n and \Zn and \Z1 \n is a new line, \Z1 and \Zn make text BOLD -# File: functions, line: 39 +# File: locale-lister, line: 38 #, sh-format -msgid "" -"Avoid spaces and special characters in directory and file names!\\Zn\\nUse a " -"high resolution screen, if possible more than 80 characters wide!\\nThen the " -"menus to 'select file' work better to show long file names.\\n\\n\\Z1Type " -"text in the bottom text box!\\Zn Use the upper text box(es) only to\\npaste " -"text into the bottom window (with the space key). The slash key\\ncan be " -"used to 'finish' moving to another directory." +msgid "Code" msgstr "" # -# File: functions, line: 41 +# File: locale-lister, line: 39 #, sh-format -msgid "iso and image file selector (easy), no search for linked files" +msgid "Name" msgstr "" # -# File: functions, line: 44 +# File: locale-lister, line: 40 #, sh-format -msgid "iso and image file selector (easy), include Linked files (may fail)" +msgid "Use this Locale:" msgstr "" # -#. # Hotkey for: "iso and image file selector (easy), include Linked files (may fail)" -# File: functions, line: 46 +#. ############################################################################ +# File: keyboard-switcher, line: 36 #, sh-format -msgid "l" +msgid "Select Layout" msgstr "" # -# File: functions, line: 47 +# File: keyboard-switcher, line: 37 #, sh-format -msgid "General File selector" +msgid "Layout" msgstr "" # -#. # Hotkey for: "General File selector" -#. # hotkey pair with "Go ahead - confirm the choice" -# File: functions, line: 49 -# File: confirm-partition, line: 42 +# File: keyboard-switcher, line: 38 #, sh-format -msgid "g" +msgid "Description" msgstr "" # -# File: functions, line: 50 +# File: keyboard-switcher, line: 39 #, sh-format -msgid "" -"Among files in the previously selected directory tree,\\nselect file type to " -"display" +msgid "Use This:" msgstr "" # -# File: functions, line: 51 +# File: keyboard-switcher, line: 40 #, sh-format -msgid "Select file type to display" +msgid "Model" msgstr "" # -# File: functions, line: 54 +# File: keyboard-switcher, line: 41 #, sh-format -msgid "all files suitable as source files" +msgid "Select Model (if unsure use pc105)" msgstr "" # -# File: functions, line: 58 +# File: keyboard-switcher, line: 42 #, sh-format -msgid "only ISO files" +msgid "Select Variant (this is optional)" msgstr "" # -# File: functions, line: 61 +# File: keyboard-switcher, line: 43 #, sh-format -msgid "only image files (with and without compression)" +msgid "Variant" msgstr "" # -# File: functions, line: 62 +# File: keyboard-switcher, line: 44 #, sh-format -msgid "Do you want to install it?" +msgid "Do you want to save your choices?" msgstr "" # -# File: functions, line: 63 +# File: keyboard-switcher, line: 45 #, sh-format -msgid "The program 'pv' can show the progress during the installation." +msgid "None" msgstr "" # -# File: functions, line: 64 +#. ########################################################## +# File: hw-progress, line: 5 #, sh-format -msgid "Prepare by making the system up to date" +msgid "Hardware firmware detector" msgstr "" # -# File: functions, line: 65 +# File: hw-progress, line: 6 #, sh-format -msgid "however, it is not installed." +msgid "Please Choose a Directory With Firmware Deb files" msgstr "" # -# File: functions, line: 66 +#. ########################################################## +#. # filesystem directory will go left of this so change accordingly if text goes right to left +# File: grub-installer, line: 12 #, sh-format -msgid "Booted from" +msgid "a root file system should be mounted on: " msgstr "" # -# File: functions, line: 67 +# File: grub-installer, line: 13 #, sh-format -msgid "Available devices" +msgid "Select drive for bootloader" msgstr "" # -# File: functions, line: 69 +#. # GRUB is the bootloader, this dialog shows which device the bootloader updated for +# File: grub-installer, line: 15 #, sh-format -msgid "The target device will be:" +msgid "Updated GRUB for:" msgstr "" # -# File: functions, line: 70 +# File: grub-installer, line: 17 #, sh-format -msgid "Target Device:" +msgid "Successfully unmounted chroot" msgstr "" # -# File: functions, line: 72 -# File: confirm-partition, line: 89 +# File: grub-installer, line: 18 #, sh-format -msgid "Click this if you are ready to go" +msgid "Couldn't successfully unmount chroot" msgstr "" # #. ########################################################## -# File: fix-device, line: 5 +# File: fix-device, line: 9 #, sh-format msgid "Checking device:" msgstr "" # -# File: fix-device, line: 7 +# File: fix-device, line: 10 #, sh-format msgid "Fix Device" msgstr "" @@ -1984,44 +1978,39 @@ msgid "to download tarballs" msgstr "" # -# File: dltbl, line: 15 -#, sh-format -msgid "Error finding the tarball path so it was made at" -msgstr "" -# #. # this is a popup to show that there was an error dowloading a file -# File: dltbl, line: 17 +# File: dltbl, line: 16 #, sh-format msgid "Error downloading:" msgstr "" # -# File: dltbl, line: 21 +# File: dltbl, line: 20 #, sh-format msgid "Download tarball" msgstr "" # -# File: dltbl, line: 27 +# File: dltbl, line: 26 #, sh-format msgid "No tarball downloaded" msgstr "" # -# File: dltbl, line: 28 +# File: dltbl, line: 27 #, sh-format msgid "Downloading" msgstr "" # -# File: dltbl, line: 29 +# File: dltbl, line: 28 #, sh-format msgid "Checking md5sum" msgstr "" # -# File: dltbl, line: 30 +# File: dltbl, line: 29 #, sh-format msgid "Bad md5sum, try to download the tarball again" msgstr "" # #. # Please leave /tarballs as is. \n is a New Line special character and should remain where appropriate -# File: dltbl, line: 32 +# File: dltbl, line: 31 #, sh-format msgid "" "Could not write to /tarballs, which is normal in a live session.\\n'Select " @@ -2029,18 +2018,23 @@ msgstr "" # #. # this means a keyboard shortcut to choose an item -# File: dltbl, line: 35 +# File: dltbl, line: 34 #, sh-format msgid "Ready To Continue" msgstr "" # -# File: dltbl, line: 36 -# File: confirm-partition, line: 87 +# File: dltbl, line: 35 +# File: confirm-partition, line: 89 #, sh-format msgid "Check the Result" msgstr "" # -# File: confirm-partition, line: 19 +# File: dltbl, line: 37 +#, sh-format +msgid "Remove" +msgstr "" +# +# File: confirm-partition, line: 21 #, sh-format msgid "Confirm partition" msgstr "" @@ -2048,13 +2042,13 @@ #. #These two lines go together around a variable showing the OS name: #. # Do you want to install OS_VARIABLE ? #. # so make appropriate punctuation if possible -# File: confirm-partition, line: 23 +# File: confirm-partition, line: 25 #, sh-format msgid "Do you want to install" msgstr "" # #. # Enter is the keyboard key -# File: confirm-partition, line: 25 +# File: confirm-partition, line: 27 #, sh-format msgid "Press Enter to quit (return to the main menu)" msgstr "" @@ -2062,161 +2056,161 @@ #. # these lines refer to a harddrive being 'mounted' as readable and writable #. # example: #. # /dev/sda is mounted -# File: confirm-partition, line: 29 +# File: confirm-partition, line: 31 #, sh-format msgid "is mounted" msgstr "" # -# File: confirm-partition, line: 30 +# File: confirm-partition, line: 32 #, sh-format msgid "has been unmounted" msgstr "" # -# File: confirm-partition, line: 31 +# File: confirm-partition, line: 33 #, sh-format msgid "was not mounted" msgstr "" # -# File: confirm-partition, line: 32 +# File: confirm-partition, line: 34 #, sh-format msgid "should NOT be mounted." msgstr "" # #. # SWAP is the linux virtual memory space on a harddrive -# File: confirm-partition, line: 34 +# File: confirm-partition, line: 36 #, sh-format msgid "NO SWAP" msgstr "" # -# File: confirm-partition, line: 35 +# File: confirm-partition, line: 37 #, sh-format msgid "and the swap partition" msgstr "" # #. # the - is a separator mark leave it if it is possible -# File: confirm-partition, line: 39 +# File: confirm-partition, line: 41 #, sh-format msgid " Swap partition - select or change" msgstr "" # -# File: confirm-partition, line: 40 +# File: confirm-partition, line: 42 #, sh-format msgid "Quit from this menu (return to the starter menu)" msgstr "" # -# File: confirm-partition, line: 43 +# File: confirm-partition, line: 45 #, sh-format msgid "Go ahead - confirm the choice" msgstr "" # #. # This is the root partition to install the operating system -# File: confirm-partition, line: 45 +# File: confirm-partition, line: 47 #, sh-format msgid "NO ROOT" msgstr "" # -# File: confirm-partition, line: 46 +# File: confirm-partition, line: 48 #, sh-format msgid " Start selecting a Root partition" msgstr "" # -# File: confirm-partition, line: 48 +# File: confirm-partition, line: 50 #, sh-format msgid "The One Button Installer is prepared to start installing" msgstr "" # -# File: confirm-partition, line: 52 +# File: confirm-partition, line: 54 #, sh-format msgid "the operating system" msgstr "" # -# File: confirm-partition, line: 53 +# File: confirm-partition, line: 55 #, sh-format msgid "to the root partition" msgstr "" # -# File: confirm-partition, line: 54 +# File: confirm-partition, line: 56 #, sh-format msgid "Change or confirm the partitions or quit" msgstr "" # -# File: confirm-partition, line: 57 +# File: confirm-partition, line: 59 #, sh-format msgid "Overview" msgstr "" # -# File: confirm-partition, line: 60 +# File: confirm-partition, line: 62 #, sh-format msgid "Autoselect - select root and swap partitions automatically" msgstr "" # -# File: confirm-partition, line: 63 +# File: confirm-partition, line: 65 #, sh-format msgid "Root partition - select or change" msgstr "" # #. #Gparted is a program name. It prepares disk partitions -# File: confirm-partition, line: 67 +# File: confirm-partition, line: 69 #, sh-format msgid "Tips (How to prepare partitions with Gparted)" msgstr "" # #. # /home is a specific directory on the computer, please leave it in English -# File: confirm-partition, line: 72 +# File: confirm-partition, line: 74 #, sh-format msgid "Create a separate /home partition" msgstr "" # -# File: confirm-partition, line: 73 +# File: confirm-partition, line: 75 #, sh-format msgid "Change /home partition" msgstr "" # -# File: confirm-partition, line: 74 +# File: confirm-partition, line: 76 #, sh-format msgid "Final WARNING" msgstr "" # #. # leave \\Z1 \\Z7 alone... these make the text more visible in the program Move them if you need to change the wording -# File: confirm-partition, line: 76 +# File: confirm-partition, line: 78 #, sh-format msgid "\\Z1This is the \\Z7 FINAL WARNING \\Z1 before starting to install !!!" msgstr "" # #. # the \\Zn ends the previous \\Z1 -# File: confirm-partition, line: 78 +# File: confirm-partition, line: 80 #, sh-format msgid "Do you really want to install and overwrite these partitions?\\Zn" msgstr "" # -# File: confirm-partition, line: 81 +# File: confirm-partition, line: 83 #, sh-format msgid "Installing" msgstr "" # -# File: confirm-partition, line: 83 +# File: confirm-partition, line: 85 #, sh-format msgid "with no swap partition" msgstr "" # -# File: confirm-partition, line: 86 +# File: confirm-partition, line: 88 #, sh-format msgid "" "to a partition on an internal hard disk drive or external USB or eSATA drive" msgstr "" # -# File: confirm-partition, line: 88 +# File: confirm-partition, line: 90 #, sh-format msgid "Current Install Location:" msgstr "" # -# File: confirm-partition, line: 91 +# File: confirm-partition, line: 93 #, sh-format msgid "Use gparted and show help" msgstr "" # #. # please leave obi-root AND obi-swap in English. Please separate the two lines with \n (the newline character) -# File: confirm-partition, line: 95 +# File: confirm-partition, line: 97 #, sh-format msgid "" "No root partition found with obi-root as the label to select automatically." diff -Nru obi-installer-3.3.0ubuntu0/po/sv.po obi-installer-3.4.0ubuntu0/po/sv.po --- obi-installer-3.3.0ubuntu0/po/sv.po 1970-01-01 00:00:00.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/po/sv.po 2018-03-15 13:13:10.000000000 +0000 @@ -0,0 +1,2284 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Nio Wiklund +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-02-08 09:50-0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +# +#. ############################################################################ +# File: zoned-out, line: 36 +#, sh-format +msgid "Time Zone" +msgstr "Tidszon" +# +# File: zoned-out, line: 37 +#, sh-format +msgid "Select Time Zone" +msgstr "Välj tidszon" +# +# File: zoned-out, line: 38 +#, sh-format +msgid "Use this Time Zone:" +msgstr "Använd den här tidszonen:" +# +#. ########################################################## +# File: zmktbl-wrapper, line: 5 +#, sh-format +msgid "" +"The zMktbl console displays output from the engine behind the zenity curtain" +msgstr "" +# +# File: zmktbl-wrapper, line: 6 +#, sh-format +msgid "Press Enter to close this zMktbl console window" +msgstr "" +# +# File: zmktbl-wrapper, line: 7 +#, sh-format +msgid "Password" +msgstr "" +# +# File: zmktbl-wrapper, line: 8 +#, sh-format +msgid "Console" +msgstr "" +# +#. ########################################################## +# File: zmktbl, line: 23 +#, sh-format +msgid "Text not found. Change directory!" +msgstr "" +# +# File: zmktbl, line: 24 +#, sh-format +msgid "make tarball master menu" +msgstr "" +# +# File: zmktbl, line: 25 +#, sh-format +msgid "Select an action (a line) from the list below or use the current value" +msgstr "" +# +# File: zmktbl, line: 26 +#, sh-format +msgid "Hotkey:" +msgstr "" +# +# File: zmktbl, line: 27 +#, sh-format +msgid "Action: Change ..." +msgstr "" +# +# File: zmktbl, line: 28 +#, sh-format +msgid "Current value" +msgstr "" +# +#. # hotkey for "Select tarball to install" +#. # Hotkey for: "iso and image file selector (easy), no search for linked files" +#. # hotkey pair with " Swap partition - select or change" +# File: zmktbl, line: 31 +# File: starter, line: 36 +# File: obi-functions, line: 48 +# File: functions, line: 46 +# File: confirm-partition, line: 39 +#, sh-format +msgid "s" +msgstr "" +# +# File: zmktbl, line: 32 +#, sh-format +msgid "Source partition" +msgstr "" +# +#. # hotkey for "Check (and repair) the file system" +# File: zmktbl, line: 33 +# File: starter, line: 52 +#, sh-format +msgid "c" +msgstr "" +# +# File: zmktbl, line: 34 +#, sh-format +msgid "Compression, gzip or xz" +msgstr "" +# +#. # hotkey for 'Tips' +#. # hotkey pair with Tips +# File: zmktbl, line: 35 +# File: starter, line: 50 +# File: confirm-partition, line: 67 +#, sh-format +msgid "t" +msgstr "" +# +# File: zmktbl, line: 36 +#, sh-format +msgid "Target file name with path" +msgstr "" +# +#. # hotkey for 'Quit' +#. # the hotkey for "Quit, no tarball selected" +#. # Hotkey for: "Quit" +#. # Hotkey for 'Quit' +#. # hotkey pair with "Quit" +# File: zmktbl, line: 37 +# File: text-mode-menu, line: 35 +# File: starter, line: 54 +# File: select-tarball, line: 12 +# File: obi-functions, line: 29 +# File: functions, line: 27 +# File: dltbl, line: 25 +# File: confirm-partition, line: 52 +#, sh-format +msgid "q" +msgstr "" +# +# File: zmktbl, line: 38 +# File: text-mode-menu, line: 40 +# File: starter, line: 34 +# File: select-part2, line: 19 +# File: obi-readme, line: 9 +# File: obi-functions, line: 30 +# File: functions, line: 28 +# File: dltbl, line: 23 +# File: confirm-partition, line: 53 +#, sh-format +msgid "Quit" +msgstr "Sluta" +# +# File: zmktbl, line: 41 +#, sh-format +msgid "Error in mkmaster" +msgstr "" +# +# File: zmktbl, line: 42 +#, sh-format +msgid "select compression" +msgstr "" +# +# File: zmktbl, line: 43 +#, sh-format +msgid "TRUE" +msgstr "" +# +# File: zmktbl, line: 44 +#, sh-format +msgid "FALSE" +msgstr "" +# +# File: zmktbl, line: 45 +#, sh-format +msgid "Click the radio button to select compression" +msgstr "" +# +# File: zmktbl, line: 46 +#, sh-format +msgid "Compression" +msgstr "" +# +# File: zmktbl, line: 47 +#, sh-format +msgid "make a 'tar.xz' file" +msgstr "" +# +# File: zmktbl, line: 48 +#, sh-format +msgid "make a 'tar.gz' file" +msgstr "" +# +# File: zmktbl, line: 50 +#, sh-format +msgid "Error in select-compression" +msgstr "" +# +# File: zmktbl, line: 51 +#, sh-format +msgid "Select target file" +msgstr "" +# +# File: zmktbl, line: 52 +# File: dltbl, line: 17 +#, sh-format +msgid "There should be enough space for the new tarball" +msgstr "" +# +# File: zmktbl, line: 53 +#, sh-format +msgid "Click this if you want to make this tarball" +msgstr "" +# +# File: zmktbl, line: 54 +#, sh-format +msgid "Remove some old tarball?" +msgstr "" +# +# File: zmktbl, line: 56 +#, sh-format +msgid "" +"Remove some old tarball(s) only if necessary, In that case,\\nplease " +"continue the dialogue in the zMktbl text console" +msgstr "" +# +# File: zmktbl, line: 57 +#, sh-format +msgid "No, continue without removing any tarball" +msgstr "" +# +# File: zmktbl, line: 58 +#, sh-format +msgid "Yes, remove some old tarball" +msgstr "" +# +# File: zmktbl, line: 59 +#, sh-format +msgid "Click this if you want to remove some old tarball" +msgstr "" +# +# File: zmktbl, line: 60 +#, sh-format +msgid "remove old tarballs" +msgstr "" +# +# File: zmktbl, line: 61 +#, sh-format +msgid "" +"Check the box to select tarballs to remove.\n" +"(spaces are replaced with .'. in the list)" +msgstr "" +# +# File: zmktbl, line: 63 +#, sh-format +msgid "Old tarballs" +msgstr "" +# +# File: zmktbl, line: 64 +#, sh-format +msgid "Click this if you want to remove these old tarballs" +msgstr "" +# +# File: zmktbl, line: 66 +#, sh-format +msgid "FINAL WARNING\\nDo you want to make this tarball?" +msgstr "" +# +#. # Enter is the Return (Enter) key on the keyboard +#. # Enter is the key on the keyboard +# File: zmktbl, line: 67 +# File: select-device, line: 17 +# File: mktbl, line: 17 +# File: dltbl, line: 32 +# File: confirm-partition, line: 82 +#, sh-format +msgid "Check the result and press Enter to continue" +msgstr "Kontrollera resultatet och tryck på Enter för att fortsätta" +# +#. ########################################################## +#. # Usage text +# File: zmktbl, line: 68 +# File: select-tarball, line: 5 +# File: select-device, line: 8 +# File: obi, line: 10 +# File: mktbl, line: 18 +# File: dltbl, line: 13 +# File: confirm-partition, line: 87 +#, sh-format +msgid "Usage" +msgstr "Användande" +# +# File: zmktbl, line: 71 +# File: mktbl, line: 21 +#, sh-format +msgid "to make a tarball of the files" +msgstr "" +# +# File: zmktbl, line: 74 +# File: mktbl, line: 24 +#, sh-format +msgid "Partition to be used:" +msgstr "" +# +# File: zmktbl, line: 76 +# File: mktbl, line: 26 +#, sh-format +msgid "" +"You may need to remove some existing tarballs,\\n'*.tar.gz' and '*.tar.xz' " +"from the tarballs directory\\nto make space for the new tarball" +msgstr "" +# +# File: zmktbl, line: 77 +# File: mktbl, line: 27 +#, sh-format +msgid "These main commands are prepared:" +msgstr "" +# +# File: zmktbl, line: 79 +#, sh-format +msgid "" +"Do you want to use -9e compression for the XZ?\\nThis will make the tarball " +"significantly smaller, but will take MUCH longer to compress." +msgstr "" +# +#. ########################################################## +# File: user-config, line: 21 +#, sh-format +msgid "Please Contact the Distro maintainer" +msgstr "" +# +# File: user-config, line: 22 +#, sh-format +msgid "Removed old user named" +msgstr "" +# +# File: user-config, line: 23 +#, sh-format +msgid "Removed old group named" +msgstr "" +# +# File: user-config, line: 24 +#, sh-format +msgid "Removing" +msgstr "" +# +# File: user-config, line: 25 +#, sh-format +msgid "Enter your new user's name" +msgstr "Ange din nya användares namn" +# +# File: user-config, line: 26 +#, sh-format +msgid "Added" +msgstr "" +# +# File: user-config, line: 27 +#, sh-format +msgid "Create Password" +msgstr "Skapa lösenord" +# +# File: user-config, line: 28 +#, sh-format +msgid "Create password" +msgstr "Skapa lösenord" +# +# File: user-config, line: 29 +#, sh-format +msgid "Submit" +msgstr "överlämna" +# +#. # Arrod DOWN and TAB are keyboard keys +# File: user-config, line: 31 +#, sh-format +msgid "Arrow DOWN for 'Repeat password', TAB for 'Submit'" +msgstr "" +# +# File: user-config, line: 32 +#, sh-format +msgid "Create new password" +msgstr "Skapa nytt lösenord" +# +# File: user-config, line: 33 +#, sh-format +msgid "Repeat the password" +msgstr "Upprepa lösenordet" +# +#. # number 6 +# File: user-config, line: 35 +#, sh-format +msgid "too short password, use at least 6 characters" +msgstr "för kort lösenord, använd minst 6 tecken" +# +# File: user-config, line: 36 +#, sh-format +msgid "the password entries match, go ahead ..." +msgstr "lösenordsposterna matchar, fortsätt" +# +# File: user-config, line: 37 +#, sh-format +msgid "SPACES NOT ALLOWED IN PASSWORDS! Try again, please!" +msgstr "RUM ej tillåtna i lösenord! Försök igen, tack!" +# +# File: user-config, line: 38 +#, sh-format +msgid "the passwords do not match, try again" +msgstr "Lösenorden matchar inte, försök igen" +# +# File: user-config, line: 39 +#, sh-format +msgid "Groups:" +msgstr "" +# +# File: user-config, line: 40 +#, sh-format +msgid "Auto Login" +msgstr "Automatisk inloggning" +# +# File: user-config, line: 41 +#, sh-format +msgid "Do you want to log your user in automatically?" +msgstr "Vill du logga in din användare automatiskt?" +# +# File: user-config, line: 42 +#, sh-format +msgid "Autologin for" +msgstr "" +# +# File: user-config, line: 43 +#, sh-format +msgid "No autologin for" +msgstr "" +# +# File: user-config, line: 44 +#, sh-format +msgid "Computer supports PAE" +msgstr "" +# +#. # PLEASE LEAVE \n this is a NEW LINE character to put the second sentence on a new line +#. # PAE is an acronym please leave it as is +# File: user-config, line: 47 +#, sh-format +msgid "" +"Do you want to install the PAE kernel now?\\n\n" +"If you are UNSURE you can always do this later, it is not needed." +msgstr "" +# +# File: user-config, line: 49 +#, sh-format +msgid "Yes install PAE chosen." +msgstr "" +# +# File: user-config, line: 50 +#, sh-format +msgid "set password for" +msgstr "" +# +# File: user-config, line: 51 +#, sh-format +msgid "No install PAE chosen." +msgstr "" +# +#. # CPU is an acronym you can translate it, this is the Central Processing Unit.. or 'Processor' +#. # flag in this case is a marker set by the processor internally, this is not a flag on a pole. +# File: user-config, line: 54 +#, sh-format +msgid "CPU has no PAE flag" +msgstr "" +# +#. # 64bit is a type of processor architecture +# File: user-config, line: 56 +#, sh-format +msgid "64bit processor" +msgstr "" +# +# File: user-config, line: 57 +#, sh-format +msgid "You might want to consider using a 64bit operating system" +msgstr "" +# +# File: user-config, line: 59 +#, sh-format +msgid "CPU is not 64bit" +msgstr "" +# +#. # xdg-dirs and gtk-dirs are programs... leave the names as is please +# File: user-config, line: 61 +#, sh-format +msgid "updated menus, and xdg-dirs and gtk-dirs" +msgstr "" +# +#. # XDG and GTK do not need to be translated +#. # xdg-user-dirs-gtk-update is a program +# File: user-config, line: 64 +#, sh-format +msgid "" +"Updated menus, and XDG directories but not GTK directories.. xdg-user-dirs-" +"gtk-update is not installed" +msgstr "" +# +# File: user-config, line: 65 +# File: starter, line: 78 +# File: select-part1, line: 20 +# File: obi-functions, line: 18 +# File: functions, line: 16 +#, sh-format +msgid "WARNING" +msgstr "VARNING" +# +#. # lightdm is a program. +#. # tarball is a compressed file format +# File: user-config, line: 68 +#, sh-format +msgid "LightDm is not installed on the tarball. This may be a software bug." +msgstr "" +# +# File: user-config, line: 69 +#, sh-format +msgid "Set system-wide time to" +msgstr "" +# +# File: user-config, line: 70 +#, sh-format +msgid "Set user's time to" +msgstr "" +# +#. # dpkg-reconfigure is a program +# File: user-config, line: 74 +#, sh-format +msgid "dpkg-reconfigure not installed on system (tarball)" +msgstr "" +# +# File: user-config, line: 75 +#, sh-format +msgid "updatedb OR updatedb.mlocate not located on tarball" +msgstr "" +# +#. # chown is a program +# File: user-config, line: 77 +#, sh-format +msgid "chown recursivley" +msgstr "" +# +#. # gksu and sudo are programs for giving a user administrator's rights +# File: user-config, line: 79 +#, sh-format +msgid "changed gksu to sudo mode for" +msgstr "" +# +# File: user-config, line: 80 +#, sh-format +msgid "Configure Timezone" +msgstr "Konfigurera tidszon" +# +# File: user-config, line: 81 +#, sh-format +msgid "Configure Keyboard" +msgstr "Konfigurera tangentbordet" +# +# File: user-config, line: 82 +#, sh-format +msgid "Updating:" +msgstr "updatering" +# +#. ########################################################## +# File: user-config, line: 83 +# File: starter, line: 26 +# File: select-tarball, line: 14 +# File: select-part2, line: 22 +# File: select-part2, line: 26 +# File: select-part1, line: 24 +# File: select-part1, line: 29 +# File: partition-help, line: 40 +# File: obi-functions, line: 76 +# File: obi, line: 15 +# File: mkp, line: 20 +# File: hw-progress, line: 7 +# File: functions, line: 74 +# File: dltbl, line: 19 +# File: confirm-partition, line: 20 +#, sh-format +msgid "One Button Installer" +msgstr "" +# +# File: user-config, line: 84 +#, sh-format +msgid "Installing PAE Kernel" +msgstr "" +# +# File: user-config, line: 85 +#, sh-format +msgid "64bit OS doesn't require PAE installation" +msgstr "" +# +# File: user-config, line: 86 +#, sh-format +msgid "Updating the System" +msgstr "Uppdatering av systemet" +# +# File: user-config, line: 87 +#, sh-format +msgid "Check for post-release Updates to the System?" +msgstr "Kontrollera efter uppdateringar efter systemet?" +# +# File: user-config, line: 88 +#, sh-format +msgid "" +"Please Note, this operation could take a long time depending on your " +"internet connection, and hardware." +msgstr "" +# +#. ########################################################## +# File: text-mode-menu, line: 33 +#, sh-format +msgid "PAE flag detected" +msgstr "" +# +# File: text-mode-menu, line: 34 +#, sh-format +msgid "No PAE flag found" +msgstr "" +# +#. # hotkey for "Installer Mode:" +#. # hotkey pair with "Overview" +# File: text-mode-menu, line: 36 +# File: starter, line: 46 +# File: confirm-partition, line: 58 +#, sh-format +msgid "o" +msgstr "" +# +#. # hotkey for "Reboot" +#. # hotkey pair with "Root partition - select or change" +# File: text-mode-menu, line: 37 +# File: starter, line: 56 +# File: confirm-partition, line: 64 +#, sh-format +msgid "r" +msgstr "" +# +#. # Hotkey for: "General File selector" +#. # hotkey pair with "Go ahead - confirm the choice" +# File: text-mode-menu, line: 38 +# File: obi-functions, line: 54 +# File: functions, line: 52 +# File: confirm-partition, line: 44 +#, sh-format +msgid "g" +msgstr "" +# +#. # hotkey for "Poweroff" +# File: text-mode-menu, line: 39 +# File: starter, line: 58 +# File: confirm-partition, line: 92 +#, sh-format +msgid "p" +msgstr "" +# +# File: text-mode-menu, line: 41 +#, sh-format +msgid "One Button Installer text mode Menu" +msgstr "One Button Installer textlägesmeny" +# +# File: text-mode-menu, line: 42 +#, sh-format +msgid "Please select an alternative with a letter key or the arrow keys" +msgstr "Välj ett alternativ med en bokstavstangent eller piltangenterna" +# +# File: text-mode-menu, line: 43 +#, sh-format +msgid "Graphics mode with Gparted and One Button Installer" +msgstr "Grafikläge med Gparted och One Button Installer" +# +# File: text-mode-menu, line: 44 +#, sh-format +msgid "One Button Installer in text mode (if very low RAM)" +msgstr "One Button Installer i textläge (om mycket låg RAM)" +# +# File: text-mode-menu, line: 45 +#, sh-format +msgid "Quit from this menu (exit to the bash shell)" +msgstr "Avsluta från denna meny (utgång till bash-skalet)" +# +# File: text-mode-menu, line: 46 +# File: starter, line: 69 +#, sh-format +msgid "Reboot" +msgstr "" +# +# File: text-mode-menu, line: 47 +#, sh-format +msgid "Poweroff" +msgstr "Stäng av" +# +# File: text-mode-menu, line: 48 +#, sh-format +msgid "Total RAM" +msgstr "Totalt RAM" +# +# File: text-mode-menu, line: 49 +#, sh-format +msgid "Used RAM" +msgstr "Använd RAM" +# +# File: text-mode-menu, line: 50 +#, sh-format +msgid "text not found. Change directory!" +msgstr "" +# +# File: text-mode-menu, line: 51 +#, sh-format +msgid "It seems you are running inside a graphical environment already" +msgstr "" +# +#. ########################################################## +# File: starter, line: 21 +# File: mkctrl, line: 8 +#, sh-format +msgid "Tarball path" +msgstr "" +# +# File: starter, line: 22 +#, sh-format +msgid "OBI text not found. Change directory" +msgstr "" +# +# File: starter, line: 23 +#, sh-format +msgid "Exit to the Shell" +msgstr "Utgång till Shell" +# +# File: starter, line: 24 +#, sh-format +msgid "Close Window" +msgstr "Stäng fönstret" +# +# File: starter, line: 25 +#, sh-format +msgid "to make the tarballs" +msgstr "" +# +# File: starter, line: 27 +# File: obi-functions, line: 11 +# File: functions, line: 9 +#, sh-format +msgid "OK" +msgstr "" +# +# File: starter, line: 28 +#, sh-format +msgid "OS to install" +msgstr "OS att installera" +# +# File: starter, line: 29 +#, sh-format +msgid "Unlabeled OS to install" +msgstr "Omärkt OS att installera" +# +# File: starter, line: 30 +#, sh-format +msgid "No tarball selected" +msgstr "" +# +# File: starter, line: 31 +#, sh-format +msgid "Had to find a tarball.. OBI found" +msgstr "" +# +# File: starter, line: 32 +#, sh-format +msgid "Starter Menu" +msgstr "Startmenyn" +# +# File: starter, line: 33 +# File: obi-functions, line: 45 +# File: functions, line: 43 +# File: confirm-partition, line: 49 +#, sh-format +msgid "Please select an action with a letter key or the arrow keys" +msgstr "Välj en åtgärd med en bokstavstangent eller piltangenterna" +# +#. # hotkey for "Partition drives and \Z1Install alongside current OS\Zn" 'used alongside for the a' +#. # Hotkey for: "all files suitable as source files" +#. # hotkey pair with "Autoselect - select root and swap partitions automatically" +# File: starter, line: 38 +# File: obi-functions, line: 58 +# File: functions, line: 56 +# File: confirm-partition, line: 61 +#, sh-format +msgid "a" +msgstr "" +# +#. # hotkey for "Install" +#. # ISO is a file format for CD images +#. # Hotkey for: "only ISO files" +# File: starter, line: 40 +# File: obi-functions, line: 62 +# File: functions, line: 60 +#, sh-format +msgid "i" +msgstr "" +# +#. # hotkey for "Download Tarball" +# File: starter, line: 42 +#, sh-format +msgid "d" +msgstr "" +# +#. # hotkey for "Make Tarball" +#. # Hotkey for: "only image files (with and without compression)" +# File: starter, line: 44 +# File: obi-functions, line: 65 +# File: functions, line: 63 +#, sh-format +msgid "m" +msgstr "" +# +#. # hotkey for "Help to select drive" +#. # hotkey pair with 'Create a separate /home partition', OR 'Change /home partition' +# File: starter, line: 48 +# File: confirm-partition, line: 72 +#, sh-format +msgid "h" +msgstr "" +# +# File: starter, line: 59 +# File: confirm-partition, line: 70 +#, sh-format +msgid "Tips (use arrow keys to scroll)" +msgstr "Tips (använd piltangenterna för att rulla)" +# +# File: starter, line: 60 +#, sh-format +msgid "Select tarball to install" +msgstr "Välj tarball att installera" +# +#. # please leave \Z1 and \Zn these make the text bold +# File: starter, line: 62 +#, sh-format +msgid "Partition drives and \\Z1Install alongside current OS\\Zn" +msgstr "Partitionenheter och \\Z1Install tillsammans med nuvarande OS\\Zn" +# +# File: starter, line: 63 +#, sh-format +msgid "Download Tarball" +msgstr "Ladda ner Tarball" +# +# File: starter, line: 64 +#, sh-format +msgid "Make Tarball" +msgstr "Gör Tarball" +# +# File: starter, line: 65 +#, sh-format +msgid "Help to select drive" +msgstr "Hjälp att välja enhet" +# +# File: starter, line: 66 +#, sh-format +msgid "Tips" +msgstr "" +# +# File: starter, line: 67 +#, sh-format +msgid "Check (and repair) the file system" +msgstr "Kontrollera (och reparera) filsystemet" +# +# File: starter, line: 68 +#, sh-format +msgid "Quit from this menu" +msgstr "Avsluta från den här menyn" +# +# File: starter, line: 70 +#, sh-format +msgid "Power Off" +msgstr "Stäng av" +# +# File: starter, line: 71 +# File: confirm-partition, line: 95 +#, sh-format +msgid "Install" +msgstr "Installera" +# +#. # SPLASH SCREEN TEXT +# File: starter, line: 73 +#, sh-format +msgid "Welcome and Warning" +msgstr "Välkommen och varning" +# +# File: starter, line: 74 +#, sh-format +msgid "Welcome" +msgstr "Välkommen" +# +#. # These Lines until END will be a paragraph, modify them as you need to +#. # please leave \Z1 and \Zn these make the text bold so make 'risky' BOLD +# File: starter, line: 77 +#, sh-format +msgid "Installing an operating system is a \\Z1risky\\Zn operation." +msgstr "Installera ett operativsystem är en \\Z1riskabel\\Zn operation." +# +#. # please leave \Z1 and \Zn these make the text bold +# File: starter, line: 80 +#, sh-format +msgid "\\Z1Copy the data you want to keep to another device\\Zn, for example:" +msgstr "\\Z1Kopiera data som du vill behålla till en annan enhet\\Zn till exempel:" +# +# File: starter, line: 81 +#, sh-format +msgid "an external hard disk drive or a cloud service! Otherwise," +msgstr "" +# +# File: starter, line: 82 +#, sh-format +msgid "there might be no easy way to recover any previous data." +msgstr "" +# +# File: starter, line: 83 +#, sh-format +msgid "Expensive intelligence services might restore some data." +msgstr "" +# +# File: starter, line: 84 +#, sh-format +msgid "If you use the BASIC installer the target device will be" +msgstr "" +# +# File: starter, line: 85 +#, sh-format +msgid "COMPLETELY OVERWRITTEN" +msgstr "HELT ÖVERVRITT" +# +# File: starter, line: 86 +#, sh-format +msgid "If you want to keep an installed operating system," +msgstr "" +# +#. # The line after this is the same as: Partition drives and \Z1Install alongside current OS\Zn +#. # this line is the END +# File: starter, line: 89 +#, sh-format +msgid "make sure to use the option" +msgstr "" +# +#. # Splash as in 'Splash Screen' +# File: starter, line: 91 +#, sh-format +msgid "Splash" +msgstr "" +# +# File: starter, line: 92 +#, sh-format +msgid "Is this a tarball you want to use:" +msgstr "" +# +# File: starter, line: 93 +#, sh-format +msgid "Installer Mode:" +msgstr "Installationsläge:" +# +# File: starter, line: 94 +# File: setlevel, line: 7 +#, sh-format +msgid "basic" +msgstr "grundläggande" +# +# File: starter, line: 95 +# File: setlevel, line: 8 +#, sh-format +msgid "advanced" +msgstr "Avancerad" +# +# File: starter, line: 96 +# File: obi-functions, line: 73 +# File: functions, line: 71 +# File: dltbl, line: 36 +# File: confirm-partition, line: 94 +#, sh-format +msgid "Hotkey" +msgstr "" +# +#. ############################### +# File: setlevel, line: 5 +#, sh-format +msgid "Select basic or advanced OBI level" +msgstr "Välj grundläggande eller avancerad OBI-nivå" +# +# File: setlevel, line: 6 +#, sh-format +msgid "The WHOLE device is ERASED and used" +msgstr "" +# +# File: setlevel, line: 9 +#, sh-format +msgid "Prepare partitions with Gparted for the advanced method" +msgstr "" +# +# File: setlevel, line: 10 +#, sh-format +msgid "Partitions are selected and used" +msgstr "" +# +# File: setlevel, line: 11 +#, sh-format +msgid "Select OBI level" +msgstr "" +# +# File: select-tarball, line: 6 +#, sh-format +msgid "Select tarball" +msgstr "" +# +# File: select-tarball, line: 7 +#, sh-format +msgid "avoid spaces in tarball names" +msgstr "" +# +#. # \n is a newline character please leave to separate lines +# File: select-tarball, line: 9 +# File: dltbl, line: 21 +#, sh-format +msgid "Please select a tarball with the arrow keys, scroll if necessary" +msgstr "" +# +# File: select-tarball, line: 10 +#, sh-format +msgid "Quit, no tarball selected" +msgstr "" +# +# File: select-tarball, line: 13 +# File: dltbl, line: 22 +#, sh-format +msgid "Available tarballs" +msgstr "" +# +# File: select-tarball, line: 15 +#, sh-format +msgid "Select tarball to use with the One Button Installer" +msgstr "" +# +# File: select-tarball, line: 16 +#, sh-format +msgid "Tarball selector (easy)" +msgstr "" +# +# File: select-tarball, line: 17 +#, sh-format +msgid "General File selector (difficult)" +msgstr "" +# +#. # \n is a newline character please leave to separate lines +# File: select-tarball, line: 19 +#, sh-format +msgid "" +"Select tarballs in standard directory (easy), or\\n\n" +"anywhere with the general file selector (difficult)?" +msgstr "" +# +# File: select-tarball, line: 21 +#, sh-format +msgid "Zero sized tarball found:" +msgstr "" +# +# File: select-tarball, line: 22 +#, sh-format +msgid "Remove it? (y/n)" +msgstr "" +# +#. # SPACE BAR and SLASH are keyboard keys +# File: select-tarball, line: 24 +#, sh-format +msgid "" +"SPACE BAR: copy selection to text-entry window, SLASH: show directory content" +msgstr "" +# +# File: select-tarball, line: 25 +#, sh-format +msgid "No tarball found (tarballs/filename.tar.gz)" +msgstr "" +# +#. ############################### +# File: select-part2, line: 14 +#, sh-format +msgid "This device mounted and cannot be unmounted:" +msgstr "" +# +# File: select-part2, line: 15 +#, sh-format +msgid "You must stop the program locking it " +msgstr "" +# +# File: select-part2, line: 16 +#, sh-format +msgid "Select partition using this key:" +msgstr "" +# +# File: select-part2, line: 17 +#, sh-format +msgid "Partition:" +msgstr "" +# +# File: select-part2, line: 18 +#, sh-format +msgid "Select Partition:" +msgstr "" +# +#. ##################################################### +# File: select-part2, line: 20 +# File: select-part1, line: 19 +#, sh-format +msgid "Usage:" +msgstr "" +# +# File: select-part2, line: 21 +#, sh-format +msgid "Select partition for the advanced Installer level" +msgstr "" +# +# File: select-part2, line: 23 +#, sh-format +msgid "Examples:" +msgstr "" +# +# File: select-part2, line: 24 +#, sh-format +msgid "scroll if necessary " +msgstr "" +# +# File: select-part2, line: 25 +#, sh-format +msgid "You must select a root partition" +msgstr "" +# +# File: select-part2, line: 27 +#, sh-format +msgid "NAME" +msgstr "" +# +# File: select-part2, line: 28 +#, sh-format +msgid "SIZE" +msgstr "" +# +# File: select-part2, line: 30 +#, sh-format +msgid "FSTYPE" +msgstr "" +# +# File: select-part2, line: 31 +#, sh-format +msgid "LABEL" +msgstr "" +# +# File: select-part2, line: 32 +#, sh-format +msgid "MOUNTPOINT" +msgstr "" +# +#. #paired with No_swap +# File: select-part2, line: 34 +#, sh-format +msgid "n" +msgstr "" +# +#. #please do not put spaces in this!!! +# File: select-part2, line: 36 +#, sh-format +msgid "No_swap" +msgstr "" +# +# File: select-part1, line: 21 +#, sh-format +msgid "the partitions will be completely overwritten" +msgstr "" +# +# File: select-part1, line: 22 +#, sh-format +msgid "Get more help to select device at the Starter menu" +msgstr "" +# +# File: select-part1, line: 23 +#, sh-format +msgid "Unmount the target partitions if mounted" +msgstr "" +# +# File: select-part1, line: 25 +#, sh-format +msgid "Select partition" +msgstr "" +# +# File: select-part1, line: 26 +# File: select-device, line: 9 +#, sh-format +msgid "Install:" +msgstr "Installera:" +# +#. # \n is a newline character please leave to separate lines +# File: select-part1, line: 27 +# File: select-device, line: 13 +#, sh-format +msgid "" +"Install to a mass storage device, typically an\\ninternal hard disk drive or " +"external USB or eSATA drive" +msgstr "" +# +# File: select-device, line: 10 +#, sh-format +msgid "Installing:" +msgstr "Installera:" +# +# File: select-device, line: 11 +#, sh-format +msgid "Target:" +msgstr "Mål:" +# +# File: select-device, line: 14 +# File: obi-functions, line: 13 +# File: functions, line: 11 +#, sh-format +msgid "Select device" +msgstr "Välj enhet" +# +# File: select-device, line: 15 +#, sh-format +msgid "Do you want to install:" +msgstr "Vill du installera:" +# +# File: select-device, line: 18 +#, sh-format +msgid "Check the result" +msgstr "Kontrollera resultatet" +# +# File: select-device, line: 19 +#, sh-format +msgid "Choose the drive to install to:" +msgstr "Välj drivrutin att installera till:" +# +#. ########################################################## +#. # \n is a new line character please leave alone +# File: partition-help, line: 15 +#, sh-format +msgid "Error finding the OBI path.\\nEXITING IMMEDIATELY" +msgstr "" +# +# File: partition-help, line: 16 +#, sh-format +msgid "" +"You can install a system from a tarball into two partitions:\\n\\n one root " +"file system partition and one swap partition. This way it is possible to " +"create a *dual boot* device with an existing (already installed) operating " +"system. It is also possible to create a separate\\n*data partition*, that " +"can be used by linux as well as Windows. (Must be FAT32, FAT16, or NTFS) OSX " +"uses HFS and HFS+, though FAT32 will work well with both OSX and Linux. " +"NTFS is usable by OSX through 3rd party apps.\\n\\n" +msgstr "" +# +# File: partition-help, line: 17 +#, sh-format +msgid "OBI detects" +msgstr "" +# +# File: partition-help, line: 18 +#, sh-format +msgid "device" +msgstr "" +# +# File: partition-help, line: 19 +#, sh-format +msgid "devices" +msgstr "" +# +# File: partition-help, line: 20 +#, sh-format +msgid "" +"NOTE: If you do not wish to hibernate/suspend you can use 1G (or less) for " +"your Swap" +msgstr "" +# +#. # please leave ${redtext} ${greentext} ${resetvid} in place +# File: partition-help, line: 22 +#, sh-format +msgid "Edit and create partitions" +msgstr "" +# +#. # this is used in a tabbed chart to show the disk drive device name and size \t is the TAB character leave it alone please +# File: partition-help, line: 26 +#, sh-format +msgid "For example: \\n The drive \\t Size" +msgstr "" +# +# File: partition-help, line: 28 +#, sh-format +msgid "You have existing SWAP partition(s) here:" +msgstr "" +# +# File: partition-help, line: 29 +#, sh-format +msgid "" +"NOTE, if you want to hibernate your SWAP should be somewhat larger than your " +"RAM" +msgstr "" +# +# File: partition-help, line: 30 +#, sh-format +msgid "Help to partition" +msgstr "" +# +# File: partition-help, line: 31 +#, sh-format +msgid "" +"No Root partition made with the label obi-root\\nDo you want to try again?" +msgstr "" +# +# File: partition-help, line: 32 +#, sh-format +msgid "Use Gparted and prepare the device for the installer in the next step" +msgstr "" +# +#. # please leave obi-root as is +# File: partition-help, line: 35 +#, sh-format +msgid "1. Put the label obi-root to one partition and format it to FAT32" +msgstr "" +# +#. # please leave obi-swap in this as is +# File: partition-help, line: 37 +#, sh-format +msgid "2. Put the label obi-swap to one partition and format it to FAT32" +msgstr "" +# +# File: partition-help, line: 38 +#, sh-format +msgid "(It is fast to format to FAT32, and it will be overwritten by the OBI)" +msgstr "" +# +# File: partition-help, line: 39 +#, sh-format +msgid "*. The other partitions 'can be anything else'" +msgstr "" +# +#. ########################################################## +# File: obi-readme, line: 8 +#, sh-format +msgid "Help" +msgstr "Hjälp" +# +# File: obi-readme, line: 10 +#, sh-format +msgid "Quick Start Guide" +msgstr "" +# +# File: obi-readme, line: 11 +#, sh-format +msgid "Detailed Help" +msgstr "" +# +# File: obi-readme, line: 12 +#, sh-format +msgid "About OBI" +msgstr "" +# +# File: obi-readme, line: 13 +#, sh-format +msgid "Learn more about the One Button Installer" +msgstr "" +# +#. ########################################################## +# File: obi-functions, line: 8 +# File: mktbl, line: 29 +#, sh-format +msgid "Press Enter to continue" +msgstr "Tryck på Enter för att fortsätta" +# +# File: obi-functions, line: 9 +#, sh-format +msgid "Error finding the tarball path so it was made at" +msgstr "" +# +#. ########################################################## +# File: obi-functions, line: 10 +# File: functions, line: 8 +#, sh-format +msgid "Help info to select drive" +msgstr "" +# +# File: obi-functions, line: 12 +# File: functions, line: 10 +#, sh-format +msgid "Use Arrow PgUp PgDn Home End keys to scroll this help info" +msgstr "" +# +# File: obi-functions, line: 14 +# File: functions, line: 12 +#, sh-format +msgid "warning and overview" +msgstr "" +# +#. # please leave \n and \Zn and \Z1 \n is a new line, \Z1 and \Zn make text BOLD +# File: obi-functions, line: 16 +# File: functions, line: 14 +#, sh-format +msgid "You NEED to choose a device for the bootloader" +msgstr "Du behöver välja en enhet för startladdaren" +# +# File: obi-functions, line: 17 +# File: functions, line: 15 +#, sh-format +msgid "" +": the device will be completely overwritten\\Zn\\nGet more help to select " +"device at the Starter menu\\n\\Z1Unmount the target device if mounted" +msgstr "" +# +#. # HotKey for: "toggle USB-only" +# File: obi-functions, line: 20 +# File: functions, line: 18 +#, sh-format +msgid "u" +msgstr "" +# +# File: obi-functions, line: 21 +# File: functions, line: 19 +#, sh-format +msgid "toggle USB-only" +msgstr "" +# +# File: obi-functions, line: 22 +# File: functions, line: 20 +#, sh-format +msgid "show all drives" +msgstr "" +# +# File: obi-functions, line: 23 +# File: functions, line: 21 +#, sh-format +msgid "hide other drives" +msgstr "" +# +# File: obi-functions, line: 24 +# File: functions, line: 22 +#, sh-format +msgid "quit installing" +msgstr "sluta installera" +# +# File: obi-functions, line: 25 +# File: functions, line: 23 +#, sh-format +msgid "and continue" +msgstr "" +# +# File: obi-functions, line: 26 +# File: functions, line: 24 +#, sh-format +msgid "Please select a device with the arrow keys, scroll if necessary" +msgstr "Välj en enhet med piltangenterna, rulla om det behövs" +# +# File: obi-functions, line: 27 +# File: functions, line: 25 +#, sh-format +msgid "Go" +msgstr "Gå" +# +# File: obi-functions, line: 31 +# File: functions, line: 29 +#, sh-format +msgid "wiping" +msgstr "" +# +#. # please leave \n this is a new line character +# File: obi-functions, line: 33 +# File: functions, line: 31 +#, sh-format +msgid "installing\\n\\nthe operating system" +msgstr "" +# +# File: obi-functions, line: 34 +# File: functions, line: 32 +#, sh-format +msgid "FINAL WARNING" +msgstr "SISTA VARNING" +# +# File: obi-functions, line: 35 +# File: functions, line: 33 +#, sh-format +msgid "" +"before wiping and installing !!!\\nDo you really want to wipe and install to " +"this device?" +msgstr "innan du torkar och installerar!\\nVill du verkligen torka och installera till" +"den här enheten?" +# +#. #SPACEBAR and SLASH are keyboard keys +# File: obi-functions, line: 37 +# File: functions, line: 35 +#, sh-format +msgid "" +"SPACEBAR: copy selection to text-entry box, SLASH: show directory content" +msgstr "MELLANOMRÅDE: kopiera urval till textrutan, SLASH: visa kataloginnehåll" +# +# File: obi-functions, line: 38 +# File: functions, line: 36 +#, sh-format +msgid "Select source file" +msgstr "" +# +# File: obi-functions, line: 39 +# File: functions, line: 37 +#, sh-format +msgid "normal, file type filter" +msgstr "" +# +# File: obi-functions, line: 40 +# File: functions, line: 38 +#, sh-format +msgid "Find and select among iso and image files, or with a general selector." +msgstr "" +# +#. # please leave \n and \Zn and \Z1 \n is a new line, \Z1 and \Zn make text BOLD +# File: obi-functions, line: 42 +# File: functions, line: 40 +#, sh-format +msgid "" +"Increase the size of the terminal window, particularly the width!\\Zn\\nThen " +"the menus to 'select file' work better to show long file names.\\n\\n" +"\\Z1Avoid spaces and special characters in directory and file names!" +msgstr "" +# +#. # please leave \n and \Zn and \Z1 \n is a new line, \Z1 and \Zn make text BOLD +# File: obi-functions, line: 44 +# File: functions, line: 42 +#, sh-format +msgid "" +"Avoid spaces and special characters in directory and file names!\\Zn\\nUse a " +"high resolution screen, if possible more than 80 characters wide!\\nThen the " +"menus to 'select file' work better to show long file names.\\n\\n\\Z1Type " +"text in the bottom text box!\\Zn Use the upper text box(es) only to\\npaste " +"text into the bottom window (with the space key). The slash key\\ncan be " +"used to 'finish' moving to another directory." +msgstr "" +# +# File: obi-functions, line: 46 +# File: functions, line: 44 +#, sh-format +msgid "iso and image file selector (easy), no search for linked files" +msgstr "" +# +# File: obi-functions, line: 49 +# File: functions, line: 47 +#, sh-format +msgid "iso and image file selector (easy), include Linked files (may fail)" +msgstr "" +# +#. # Hotkey for: "iso and image file selector (easy), include Linked files (may fail)" +# File: obi-functions, line: 51 +# File: functions, line: 49 +#, sh-format +msgid "l" +msgstr "" +# +# File: obi-functions, line: 52 +# File: functions, line: 50 +#, sh-format +msgid "General File selector" +msgstr "" +# +# File: obi-functions, line: 55 +# File: functions, line: 53 +#, sh-format +msgid "" +"Among files in the previously selected directory tree,\\nselect file type to " +"display" +msgstr "" +# +# File: obi-functions, line: 56 +# File: functions, line: 54 +#, sh-format +msgid "Select file type to display" +msgstr "" +# +# File: obi-functions, line: 59 +# File: functions, line: 57 +#, sh-format +msgid "all files suitable as source files" +msgstr "" +# +# File: obi-functions, line: 63 +# File: functions, line: 61 +#, sh-format +msgid "only ISO files" +msgstr "" +# +# File: obi-functions, line: 66 +# File: functions, line: 64 +#, sh-format +msgid "only image files (with and without compression)" +msgstr "" +# +# File: obi-functions, line: 67 +# File: functions, line: 65 +#, sh-format +msgid "Do you want to install it?" +msgstr "" +# +# File: obi-functions, line: 68 +# File: functions, line: 66 +#, sh-format +msgid "The program 'pv' can show the progress during the installation." +msgstr "" +# +# File: obi-functions, line: 69 +# File: functions, line: 67 +#, sh-format +msgid "Prepare by making the system up to date" +msgstr "" +# +# File: obi-functions, line: 70 +# File: functions, line: 68 +#, sh-format +msgid "however, it is not installed." +msgstr "" +# +# File: obi-functions, line: 71 +# File: functions, line: 69 +#, sh-format +msgid "Booted from" +msgstr "" +# +# File: obi-functions, line: 72 +# File: functions, line: 70 +#, sh-format +msgid "Available devices" +msgstr "Tillgängliga enheter" +# +# File: obi-functions, line: 74 +# File: functions, line: 72 +#, sh-format +msgid "The target device will be:" +msgstr "Målenheten kommer att vara:" +# +# File: obi-functions, line: 75 +# File: functions, line: 73 +#, sh-format +msgid "Target Device:" +msgstr "Målenhet:" +# +# File: obi-functions, line: 77 +# File: functions, line: 75 +# File: confirm-partition, line: 91 +#, sh-format +msgid "Click this if you are ready to go" +msgstr "Klicka här om du är redo att gå" +# +# File: obi-functions, line: 78 +# File: functions, line: 76 +#, sh-format +msgid "Error finding the OBI selected path" +msgstr "" +# +# File: obi-functions, line: 79 +# File: functions, line: 77 +#, sh-format +msgid "Script not found. Change directory" +msgstr "" +# +#. ########################################################## +# File: obi, line: 8 +#, sh-format +msgid "Run this as ROOT" +msgstr "" +# +# File: obi, line: 9 +#, sh-format +msgid "Install operating system with the One Button Installer" +msgstr "Installera operativsystemet med One Button Installer" +# +# File: obi, line: 11 +#, sh-format +msgid "Selected Tarball" +msgstr "" +# +# File: obi, line: 12 +#, sh-format +msgid "selecting" +msgstr "" +# +# File: obi, line: 13 +# File: confirm-partition, line: 84 +#, sh-format +msgid "with swap" +msgstr "" +# +# File: obi, line: 14 +#, sh-format +msgid "without swap" +msgstr "" +# +# File: obi, line: 16 +#, sh-format +msgid "Progress" +msgstr "Framsteg" +# +#. ########################################################## +#. please leave zMktbl as is, also \n is the newline character +# File: mktbl, line: 16 +# File: dltbl, line: 18 +#, sh-format +msgid "Remove some old tarball(s) only if necessary" +msgstr "" +# +# File: mktbl, line: 28 +#, sh-format +msgid "Do you want to continue?" +msgstr "" +# +# File: mktbl, line: 30 +#, sh-format +msgid "Default" +msgstr "" +# +# File: mktbl, line: 31 +#, sh-format +msgid "compression" +msgstr "" +# +# File: mktbl, line: 32 +#, sh-format +msgid "filename" +msgstr "" +# +# File: mktbl, line: 33 +#, sh-format +msgid "source partition" +msgstr "" +# +# File: mktbl, line: 34 +#, sh-format +msgid "destination" +msgstr "" +# +# File: mktbl, line: 35 +#, sh-format +msgid "Example" +msgstr "" +# +# File: mktbl, line: 36 +#, sh-format +msgid "The file extension tar.xz or tar.gz is added automatically" +msgstr "" +# +# File: mktbl, line: 37 +#, sh-format +msgid "Run from bash if not default" +msgstr "" +# +# File: mktbl, line: 38 +#, sh-format +msgid "" +"The default is xz compression because it is often 20% or more\\nefficient " +"(smaller files) compared to gzip for gz files." +msgstr "" +# +# File: mktbl, line: 39 +#, sh-format +msgid "tarball finished, syncing now ..." +msgstr "" +# +#. ########################################################## +# File: mkpxpy, line: 8 +# File: mkp2p1, line: 9 +# File: mkp1, line: 9 +# File: mkp, line: 22 +#, sh-format +msgid "mount of what should become the root partition failed" +msgstr "" +# +# File: mkpxpy, line: 9 +# File: mkp, line: 23 +#, sh-format +msgid "Use existing swap partition" +msgstr "" +# +# File: mkpxpy, line: 10 +# File: mkp, line: 24 +#, sh-format +msgid "keep its UUID" +msgstr "" +# +# File: mkpxpy, line: 11 +# File: mkp, line: 25 +#, sh-format +msgid "Make a swap partition" +msgstr "" +# +# File: mkpxpy, line: 12 +# File: mkp, line: 26 +#, sh-format +msgid "and get new UUID" +msgstr "" +# +#. ########################################################## +# File: mkp, line: 8 +#, sh-format +msgid "Disk is smaller than" +msgstr "Disken är mindre än" +# +# File: mkp, line: 9 +#, sh-format +msgid "only gzip and xz compression implemented" +msgstr "" +# +# File: mkp, line: 10 +#, sh-format +msgid "(the tarball) is expanded, syncing the drive" +msgstr "" +# +# File: mkp, line: 11 +#, sh-format +msgid "Reboot Now" +msgstr "Starta om nu" +# +# File: mkp, line: 12 +#, sh-format +msgid "Do you want to reboot into" +msgstr "Vill du starta om igen" +# +# File: mkp, line: 13 +#, sh-format +msgid "Not rebooting" +msgstr "" +# +# File: mkp, line: 14 +#, sh-format +msgid "The installation has finished" +msgstr "Installationen är klar" +# +# File: mkp, line: 15 +# File: grub-installer, line: 16 +#, sh-format +msgid "Installing Bootloader" +msgstr "Installera Bootloader" +# +# File: mkp, line: 17 +#, sh-format +msgid "Extracting:" +msgstr "extrahera:" +# +# File: mkp, line: 18 +#, sh-format +msgid "OBI Log File" +msgstr "" +# +# File: mkp, line: 19 +#, sh-format +msgid "Do you want to check the install Log?" +msgstr "Vill du kolla installationsloggen" +# +# File: mkp, line: 21 +#, sh-format +msgid "If unsure choose this device:" +msgstr "Om du är osäker väljer du den här enheten" +# +#. ########################################################## +# File: mkhome, line: 5 +#, sh-format +msgid "Home partition is not specified, as obi-home" +msgstr "" +# +# File: mkctrl, line: 9 +#, sh-format +msgid "not found or not a file" +msgstr "" +# +# File: mkctrl, line: 10 +#, sh-format +msgid "Trying with the default tarball" +msgstr "" +# +# File: mkctrl, line: 11 +#, sh-format +msgid "No system name specified, using the name of the tarball" +msgstr "" +# +#. ############################################################################ +# File: locale-lister, line: 37 +#, sh-format +msgid "Select Language" +msgstr "Välj språk" +# +# File: locale-lister, line: 38 +#, sh-format +msgid "Code" +msgstr "" +# +# File: locale-lister, line: 39 +#, sh-format +msgid "Name" +msgstr "Namn" +# +# File: locale-lister, line: 40 +#, sh-format +msgid "Use this Locale:" +msgstr "Använd den här platsen" +# +#. ############################################################################ +# File: keyboard-switcher, line: 36 +#, sh-format +msgid "Select Layout" +msgstr "Välj tangentbordslayout" +# +# File: keyboard-switcher, line: 37 +#, sh-format +msgid "Layout" +msgstr "tangentbordslayout" +# +# File: keyboard-switcher, line: 38 +#, sh-format +msgid "Description" +msgstr "Beskrivning" +# +# File: keyboard-switcher, line: 39 +#, sh-format +msgid "Use This:" +msgstr "Använd detta:" +# +# File: keyboard-switcher, line: 40 +#, sh-format +msgid "Model" +msgstr "tangentbordsmodell" +# +# File: keyboard-switcher, line: 41 +#, sh-format +msgid "Select Model (if unsure use pc105)" +msgstr "Välj tangentbordsmodell (om du är osäker på använd pc105)" +# +# File: keyboard-switcher, line: 42 +#, sh-format +msgid "Select Variant (this is optional)" +msgstr "Välj tangentbordsvariant (detta är valfritt)" +# +# File: keyboard-switcher, line: 43 +#, sh-format +msgid "Variant" +msgstr "Tangentbordsvariant" +# +# File: keyboard-switcher, line: 44 +#, sh-format +msgid "Do you want to save your choices?" +msgstr "Vill du spara dina val?" +# +#. ########################################################## +# File: hw-progress, line: 5 +#, sh-format +msgid "Hardware firmware detector" +msgstr "" +# +# File: hw-progress, line: 6 +#, sh-format +msgid "Please Choose a Directory With Firmware Deb files" +msgstr "" +# +#. ########################################################## +#. # filesystem directory will go left of this so change accordingly if text goes right to left +# File: grub-installer, line: 12 +#, sh-format +msgid "a root file system should be mounted on: " +msgstr "" +# +# File: grub-installer, line: 13 +#, sh-format +msgid "Select drive for bootloader" +msgstr "Välj enhet för startladdare" +# +#. # GRUB is the bootloader, this dialog shows which device the bootloader updated for +# File: grub-installer, line: 15 +#, sh-format +msgid "Updated GRUB for:" +msgstr "" +# +# File: grub-installer, line: 17 +#, sh-format +msgid "unmounted all chroot bound filesystems" +msgstr "" +# +# File: grub-installer, line: 18 +#, sh-format +msgid "Successfully unmounted chroot" +msgstr "" +# +# File: grub-installer, line: 19 +#, sh-format +msgid "Couldn't successfully unmount chroot" +msgstr "" +# +#. ########################################################## +# File: fix-device, line: 9 +#, sh-format +msgid "Checking device:" +msgstr "" +# +# File: fix-device, line: 10 +#, sh-format +msgid "Fix Device" +msgstr "" +# +#. ########################################################## +# File: findtbl, line: 5 +#, sh-format +msgid "Found Tarball" +msgstr "" +# +#. ########################################################## +#. # please leave dltbl, this is the program name +# File: dltbl, line: 7 +#, sh-format +msgid "dltbl: cannot download tarballs for" +msgstr "" +# +# File: dltbl, line: 8 +#, sh-format +msgid "Cannot find repository automatically for this distro/version" +msgstr "" +# +#. # ~/tarballs is a directory and should remain as is +# File: dltbl, line: 10 +#, sh-format +msgid "Download/check tarballs manually and move them to ~/tarballs" +msgstr "" +# +#. # Enter key on the keyboard +# File: dltbl, line: 12 +#, sh-format +msgid "Press ENTER to continue" +msgstr "" +# +# File: dltbl, line: 14 +#, sh-format +msgid "to download tarballs" +msgstr "" +# +#. # this is a popup to show that there was an error dowloading a file +# File: dltbl, line: 16 +#, sh-format +msgid "Error downloading:" +msgstr "" +# +# File: dltbl, line: 20 +#, sh-format +msgid "Download tarball" +msgstr "" +# +# File: dltbl, line: 26 +#, sh-format +msgid "No tarball downloaded" +msgstr "" +# +# File: dltbl, line: 27 +#, sh-format +msgid "Downloading" +msgstr "" +# +# File: dltbl, line: 28 +#, sh-format +msgid "Checking md5sum" +msgstr "" +# +# File: dltbl, line: 29 +#, sh-format +msgid "Bad md5sum, try to download the tarball again" +msgstr "" +# +#. # Please leave /tarballs as is. \n is a New Line special character and should remain where appropriate +# File: dltbl, line: 31 +#, sh-format +msgid "" +"Could not write to /tarballs, which is normal in a live session.\\n'Select " +"tarball' can still find the tarball automatically." +msgstr "" +# +#. # this means a keyboard shortcut to choose an item +# File: dltbl, line: 34 +#, sh-format +msgid "Ready To Continue" +msgstr "" +# +# File: dltbl, line: 35 +# File: confirm-partition, line: 89 +#, sh-format +msgid "Check the Result" +msgstr "" +# +# File: dltbl, line: 37 +#, sh-format +msgid "Remove" +msgstr "" +# +# File: confirm-partition, line: 21 +#, sh-format +msgid "Confirm partition" +msgstr "Bekräfta partitionen" +# +#. #These two lines go together around a variable showing the OS name: +#. # Do you want to install OS_VARIABLE ? +#. # so make appropriate punctuation if possible +# File: confirm-partition, line: 25 +#, sh-format +msgid "Do you want to install" +msgstr "" +# +#. # Enter is the keyboard key +# File: confirm-partition, line: 27 +#, sh-format +msgid "Press Enter to quit (return to the main menu)" +msgstr "Tryck på enter-knappen för att avsluta (återgå till huvudmenyn)" +# +#. # these lines refer to a harddrive being 'mounted' as readable and writable +#. # example: +#. # /dev/sda is mounted +# File: confirm-partition, line: 31 +#, sh-format +msgid "is mounted" +msgstr "" +# +# File: confirm-partition, line: 32 +#, sh-format +msgid "has been unmounted" +msgstr "" +# +# File: confirm-partition, line: 33 +#, sh-format +msgid "was not mounted" +msgstr "" +# +# File: confirm-partition, line: 34 +#, sh-format +msgid "should NOT be mounted." +msgstr "" +# +#. # SWAP is the linux virtual memory space on a harddrive +# File: confirm-partition, line: 36 +#, sh-format +msgid "NO SWAP" +msgstr "" +# +# File: confirm-partition, line: 37 +#, sh-format +msgid "and the swap partition" +msgstr "" +# +#. # the - is a separator mark leave it if it is possible +# File: confirm-partition, line: 41 +#, sh-format +msgid " Swap partition - select or change" +msgstr "" +# +# File: confirm-partition, line: 42 +#, sh-format +msgid "Quit from this menu (return to the starter menu)" +msgstr "Avsluta från den här menyn (återgå till startmenyn)" +# +# File: confirm-partition, line: 45 +#, sh-format +msgid "Go ahead - confirm the choice" +msgstr "Fortsätt - bekräfta valet" +# +#. # This is the root partition to install the operating system +# File: confirm-partition, line: 47 +#, sh-format +msgid "NO ROOT" +msgstr "" +# +# File: confirm-partition, line: 48 +#, sh-format +msgid " Start selecting a Root partition" +msgstr "" +# +# File: confirm-partition, line: 50 +#, sh-format +msgid "The One Button Installer is prepared to start installing" +msgstr "" +# +# File: confirm-partition, line: 54 +#, sh-format +msgid "the operating system" +msgstr "" +# +# File: confirm-partition, line: 55 +#, sh-format +msgid "to the root partition" +msgstr "" +# +# File: confirm-partition, line: 56 +#, sh-format +msgid "Change or confirm the partitions or quit" +msgstr "" +# +# File: confirm-partition, line: 59 +#, sh-format +msgid "Overview" +msgstr "" +# +# File: confirm-partition, line: 62 +#, sh-format +msgid "Autoselect - select root and swap partitions automatically" +msgstr "" +# +# File: confirm-partition, line: 65 +#, sh-format +msgid "Root partition - select or change" +msgstr "" +# +#. #Gparted is a program name. It prepares disk partitions +# File: confirm-partition, line: 69 +#, sh-format +msgid "Tips (How to prepare partitions with Gparted)" +msgstr "" +# +#. # /home is a specific directory on the computer, please leave it in English +# File: confirm-partition, line: 74 +#, sh-format +msgid "Create a separate /home partition" +msgstr "" +# +# File: confirm-partition, line: 75 +#, sh-format +msgid "Change /home partition" +msgstr "" +# +# File: confirm-partition, line: 76 +#, sh-format +msgid "Final WARNING" +msgstr "" +# +#. # leave \\Z1 \\Z7 alone... these make the text more visible in the program Move them if you need to change the wording +# File: confirm-partition, line: 78 +#, sh-format +msgid "\\Z1This is the \\Z7 FINAL WARNING \\Z1 before starting to install !!!" +msgstr "" +# +#. # the \\Zn ends the previous \\Z1 +# File: confirm-partition, line: 80 +#, sh-format +msgid "Do you really want to install and overwrite these partitions?\\Zn" +msgstr "" +# +# File: confirm-partition, line: 83 +#, sh-format +msgid "Installing" +msgstr "installera" +# +# File: confirm-partition, line: 85 +#, sh-format +msgid "with no swap partition" +msgstr "" +# +# File: confirm-partition, line: 88 +#, sh-format +msgid "" +"to a partition on an internal hard disk drive or external USB or eSATA drive" +msgstr "" +# +# File: confirm-partition, line: 90 +#, sh-format +msgid "Current Install Location:" +msgstr "" +# +# File: confirm-partition, line: 93 +#, sh-format +msgid "Use gparted and show help" +msgstr "" +# +#. # please leave obi-root AND obi-swap in English. Please separate the two lines with \n (the newline character) +# File: confirm-partition, line: 97 +#, sh-format +msgid "" +"No root partition found with obi-root as the label to select automatically." +"\\nNo swap partition found with obi-swap as the label to select " +"automatically." +msgstr "" diff -Nru obi-installer-3.3.0ubuntu0/README.md obi-installer-3.4.0ubuntu0/README.md --- obi-installer-3.3.0ubuntu0/README.md 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/README.md 2018-03-15 13:13:10.000000000 +0000 @@ -1,10 +1,37 @@ ![Alt text](/img/48/obi-hi-res-splash-icon.png?raw=true "OBI Icon") -#One Button Installer -A simple installer for ToriOS (or other operating systems) stored in a compressed tarball format of a single device. +# One Button Installer +A simple installer for ToriOS (or other operating systems) stored in a compressed tarball format (gzip/xz) of a single device. +The tarball can be easily made using zmktbl/mktbl from a live CD -This works entirely as a script using zenity dialogs (or alternatively dialog dialogs from a terminal) to partition/format a device decompress the image and then install GRUB and add user configuration +The tarballs can alternatively be created using [ISOmaker's](https://github.com/Israel-D/ISOmaker) [OSmaker](https://github.com/Israel-D/ISOmaker/blob/master/OSmaker) script. + +This works entirely as a script using zenity dialogs (or alternatively dialog dialogs from a terminal) to: + * partition/format a device automatically using the whole device (or allow the user to use gparted for manual configuration) + * label the partition with the tarball name + * decompress the tarball image (tar.gx/tar.xz format) + * install GRUB + * add user and then configure timezone/keyboard/etc.. ![Alt text](/img/zmktbl.png?raw=true "zmktbl Icon") -#zmktbl -A zenity dialog for making compressed images for the OBI +# zmktbl +A zenity dialog program for making compressed images for the OBI, or to simply backup a drive. + +# A few Screenshots of OBI + +## Intro splash screen Zenity +![Alt text](/screenshots/intro.png?raw=true "Zenity Splash") + +## Intro splash screen Dialog version +![Alt text](/screenshots/intro-dialog.png?raw=true "Dialog Splash") + +## Zenity Menu +![Alt text](/screenshots/starter.png?raw=true "Zenity Menu") + +## Dialog Menu +![Alt text](/screenshots/starter-dialog.png?raw=true "Dialog Menu") + +## Zenity Device dialog +![Alt text](/screenshots/device.png?raw=true "Zenity Device dialog") +## Dialog Device dialog +![Alt text](/screenshots/device-dialog.png?raw=true "Dialog Device dialog") Binary files /tmp/tmpMHGrvD/YbJC_yx6OD/obi-installer-3.3.0ubuntu0/screenshots/device-dialog.png and /tmp/tmpMHGrvD/bWp9xbfDPd/obi-installer-3.4.0ubuntu0/screenshots/device-dialog.png differ Binary files /tmp/tmpMHGrvD/YbJC_yx6OD/obi-installer-3.3.0ubuntu0/screenshots/device.png and /tmp/tmpMHGrvD/bWp9xbfDPd/obi-installer-3.4.0ubuntu0/screenshots/device.png differ Binary files /tmp/tmpMHGrvD/YbJC_yx6OD/obi-installer-3.3.0ubuntu0/screenshots/intro-dialog.png and /tmp/tmpMHGrvD/bWp9xbfDPd/obi-installer-3.4.0ubuntu0/screenshots/intro-dialog.png differ Binary files /tmp/tmpMHGrvD/YbJC_yx6OD/obi-installer-3.3.0ubuntu0/screenshots/intro.png and /tmp/tmpMHGrvD/bWp9xbfDPd/obi-installer-3.4.0ubuntu0/screenshots/intro.png differ Binary files /tmp/tmpMHGrvD/YbJC_yx6OD/obi-installer-3.3.0ubuntu0/screenshots/starter-dialog.png and /tmp/tmpMHGrvD/bWp9xbfDPd/obi-installer-3.4.0ubuntu0/screenshots/starter-dialog.png differ Binary files /tmp/tmpMHGrvD/YbJC_yx6OD/obi-installer-3.3.0ubuntu0/screenshots/starter.png and /tmp/tmpMHGrvD/bWp9xbfDPd/obi-installer-3.4.0ubuntu0/screenshots/starter.png differ diff -Nru obi-installer-3.3.0ubuntu0/TODO obi-installer-3.4.0ubuntu0/TODO --- obi-installer-3.3.0ubuntu0/TODO 2018-01-21 16:37:25.000000000 +0000 +++ obi-installer-3.4.0ubuntu0/TODO 2018-03-15 13:13:10.000000000 +0000 @@ -1,8 +1,7 @@ +maketranslation +_______________________________________________ + +In maketranslation line 29: + echo $locale + ^-- SC2086: Double quote to prevent globbing and word splitting. -OBI: - - Standard, dialog mode: - - Installing, window title font is fine but window font size too small (for me). "Low Graphics" mode is perfect. - - After install, won't boot. - - Low Graphics, text mode: - - After install, won't boot. - - Check for updates launches external dialog "no internet", should it do this in text mode? Binary files /tmp/tmpMHGrvD/YbJC_yx6OD/obi-installer-3.3.0ubuntu0/usr/share/locale/en/LC_MESSAGES/obi-installer.mo and /tmp/tmpMHGrvD/bWp9xbfDPd/obi-installer-3.4.0ubuntu0/usr/share/locale/en/LC_MESSAGES/obi-installer.mo differ Binary files /tmp/tmpMHGrvD/YbJC_yx6OD/obi-installer-3.3.0ubuntu0/usr/share/locale/es/LC_MESSAGES/obi-installer.mo and /tmp/tmpMHGrvD/bWp9xbfDPd/obi-installer-3.4.0ubuntu0/usr/share/locale/es/LC_MESSAGES/obi-installer.mo differ Binary files /tmp/tmpMHGrvD/YbJC_yx6OD/obi-installer-3.3.0ubuntu0/usr/share/locale/sv/LC_MESSAGES/obi-installer.mo and /tmp/tmpMHGrvD/bWp9xbfDPd/obi-installer-3.4.0ubuntu0/usr/share/locale/sv/LC_MESSAGES/obi-installer.mo differ