Build option

Post Reply
User avatar
bobo5290461
Crewman
Posts: 49
Joined: Mon Dec 11, 2017 1:52 pm
Location: Lochristi
Contact:
Belgium
Build option

Post by bobo5290461 » Fri Mar 06, 2020 9:48 am

In the installation script with the name 30-build-the-iso-the-first-time i added a few lines

Code: Select all

#!/bin/bash
#set -e
SECONDS=0
I added seconds!!

At the end i added

Code: Select all

cp $buildFolder/archiso/out/arco* $outFolder


if (( $SECONDS > 3600 )) ; then
    let "hours=SECONDS/3600"
    let "minutes=(SECONDS%3600)/60"
    let "seconds=(SECONDS%3600)%60"
    echo "Completed in $hours hour(s), $minutes minute(s) and $seconds second(s)" 
elif (( $SECONDS > 60 )) ; then
    let "minutes=(SECONDS%3600)/60"
    let "seconds=(SECONDS%3600)%60"
    echo "Completed in $minutes minute(s) and $seconds second(s)"
else
    echo "Completed in $SECONDS seconds"
So now , when your build is finished it tells you how long it took to build!!!
Tx Anyone , Anywhere , Anyhow , Anytime , Anyway.

User avatar
erikdubois
Captain
Posts: 2954
Joined: Tue Nov 07, 2017 3:45 pm
Location: Belgium
Contact:
Belgium
Re: Build option

Post by erikdubois » Fri Mar 06, 2020 3:39 pm

Thanks to the post I went to look what we have in Linux.

Time is a great command to time your scripts.

Learn, have fun and enjoy.
But first use the power of the Arch Wiki
use the tutorials on https://www.youtube.com/erikdubois
then use the power of google
then use the power of our moderators.

User avatar
bobo5290461
Crewman
Posts: 49
Joined: Mon Dec 11, 2017 1:52 pm
Location: Lochristi
Contact:
Belgium
Re: Build option

Post by bobo5290461 » Fri Mar 06, 2020 8:18 pm

Indeed , time is a great command but i know that there is a 99% chance that i will start my script without time so.. I went looking for a solution and i'm a lazy bast... LOL
Tx Anyone , Anywhere , Anyhow , Anytime , Anyway.


Post Reply

Return to “Developer Information”