Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BOW (A Helper For Arch) Is Now Ready For DL
#51
I have tried to keep BOW simple in code. Only using the if/then/else command structure. The reason for that was because it was targeted towards beginner/novice users.
And with a little investigation,  they could look at the code and have a decent understanding of what it was doing. As well as use it to learn from. 

This has worked well for a while. But BOW is growing, and after 2,000 lines of code it began to become confusing, even to me the creator.
If it is confusing to me... A novice would get completely lost in it. 

As of yesterday, it was at 2,510 lines. Something had to change. 
The only logical thing to do was to introduce functions. So that is what I am doing. But this will mean a total rework  of 2,500+ lines.
Though not a terribly big deal (I do it as much for myself as I do for you all.) it's Just time consuming.
So far it is down to  2,332 lines and I have just started. It also seems a little snappier, but I am not sure of this yet.

To understand this code you will need to understand what I mean by a "function"
A function works similar to a variable. The difference (correct me if I am wrong) is that you can pass many commands into a single function.

The basic function layout(again, correct me if I am wrong) looks like this
Code:
#!/bin/bash
# The basic function layout is below this line

the_basic_function()  {
               
  # Add the commands you want here
    echo "put as much stuff here as you need"
    echo "Just make sure they are inside the curly brackets"
}

# End of function. To call the function is simple. Just enter the name of it.like this,

the_basic_function

Quite simple once you are used to working with them.


For those who are not concerned with what is under the hood of BOW, you need not worry. Everything will work the same. In actual use, you should see little to no difference.
Maybe a slight boost in speed, but that is uncertain as it is already fast. Also how you close BOW may change a little, but nothing to fear.

So that's about it for now. 

kudos
A computer without Microsoft is like a piece of chocolate cake without ketchup and mustard.
-
It is okay to not be able to answer a question,
however it should be a crime to not be able to question an answer.

@ArrowLinux
Reply
#52
In the middle of this change I have added the ability to choose which AUR Helper you use to list available updates, and the AUR Helper you want to use to actually install with. for example I use Pacaur to list available updates and Yay to actually install them

the paths are
1: Update Options > 5: Manage AUR Helper(s) > 5: Set Default AUR Manager To list updates
and 
1: Update Options > 5: Manage AUR Helper(s) > 6: Set Default AUR Manager To install updates

If you do not like your chioce you can always change it the same way. Or if you liked it the way it was before you started fiddling with it you can reset it.
1: Update Options > 5: Manage AUR Helper(s) > 4: Reset AUR Settings

A little more freedom of choice.

I had been meaning to do that for a week or two. 

As before, if you only have one AUR helper you do not need to worry about this. This is for those who have multiple AUR helpers.

This new addition also bumped it back up to 2,448 lines. But we will see where it ends up in a few days.


kudos
A computer without Microsoft is like a piece of chocolate cake without ketchup and mustard.
-
It is okay to not be able to answer a question,
however it should be a crime to not be able to question an answer.

@ArrowLinux
Reply
#53
Eli,
I have been using BOW for a good while now. It works flawlessly. I only have one complaint. I have been trying to make a contribution to you through paypal. Although I live in Mexico I have a USA paypal account. When I go to my account and enter the code you have given, it won't let me go any further. It says something that means "no such thing."

Richard
Reply
#54
(06-25-2019, 11:42 PM)Richard Wrote: Eli,
I have been using BOW for a good while now. It works flawlessly. I only have one complaint. I have been trying to make a contribution to you through paypal. Although I live in Mexico I have a USA paypal account. When I go to my account and enter the code you have given, it won't let me go any further. It says something that means "no such thing."

Richard

That is interesting I also live in Mexico. Acapulco to be more precise. As for the paypal issue, thanks for bringing that to my attention.i will investigate.
A computer without Microsoft is like a piece of chocolate cake without ketchup and mustard.
-
It is okay to not be able to answer a question,
however it should be a crime to not be able to question an answer.

@ArrowLinux
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)