Git Product home page Git Product logo

mybb-shetup's People

Contributors

darksonic37 avatar joshharmon avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

cloudxtreme

mybb-shetup's Issues

Add MySQL DB creation to main()

The DB function hasn't been added to main yet. It still needs to validate that mysql is at a place in $PATH, else we need to ask the user for a path to it.

Assigning myself to the task, since that was my little addon.

Change how the download part works

The way the download part of the script works is not as I originally intended. Take a look at the command_pick and download functions. It basically checks if either git, wget, curl or lynx are available and downloads the branch using whichever command was available first.

The user should be asked if he wants to download the latest code from a branch on GitHub (master/stable/feature) or a specific version (1.6.5, 1.6.9, 1.6.10 or 1.8.1). If the user chose to download a branch it must use git to clone the repository, so as to fetch the latest code. If git isn't available, abort the script. And if the user chose a specific version like 1.6.5 the script should check if either wget or curl are available and download 1.6.5 from the tagged versions on GitHub using whichever command was available first.

Thoughts on this? I am also considering dropping lynx from the list of download methods. It's pointless. Almost any machine will have either wget or curl installed. Tons of other scripts rely solely on wget or curl to download stuff.

Check PHP version before trying to create PHP server

We should check the user's PHP version before running the PHP server.

If it's less than 5.4, we could just echo a message. Otherwise, open the server.

We'll need to do something like PHP_VERSION=php -v and find the version number within.

pick_command not found

Joshs-iMac:mybb-shetup josh$ ./mybb-shetup.sh

  __  __       ____  ____  
 |  \/  |     |  _ \|  _ \ 
 | \  / |_   _| |_) | |_) |
 | |\/| | | | |  _ <|  _ < 
 | |  | | |_| | |_) | |_) |
 |_|  |_|\__, |____/|____/ 
          __/ |            
         |___/             


Because free never tasted so good!

Welcome to mybb-shetup, the MyBB shell installer. This script will help you set up a copy of MyBB in a minute!
Press [ENTER] to continue... or press CTRL+C to quit.

Where would you like to install MyBB to (FULL PATH)? []/Users/josh/Desktop/mybb-shetup-test
The path you entered does not exist. Would you like to create it? [Y/n]Y
Creating /Users/josh/Desktop/mybb-shetup-test...
What branch would you like to download? [MASTER/stable/feature]feature
Do you want to install MyBB feature to ? [Y/n]Y
./mybb-shetup.sh: line 170: pick_command: command not found
Joshs-iMac:mybb-shetup josh$

Organize source tree

I was reading some bash stuff on best practices, portability and whatnot and came across a cool folder structure.

https://github.com/ymattw/sandbox/blob/master/sh/bash-best-practices.md#organize-your-source-tree

Any thoughts on this? I think it could be beneficial to split code into multiple files. It's clearly far more organized (better than what we have anyway). It also looks really pro. :P

On the other hand this no longer allows the script to be a single file download & run sort of thing. Not that it really matters, but it does lose that aspect to it.

It would also require some additional steps during installation to be able to run the script typing just mybbshetup. Upon cloning the repo, you would have to move the whole folder somewhere and symlink /bin/run.sh to /usr/local/bin/mybbshetup or something like that. Again, this doesn't really matter because installation is supposed to be a quick copy & paste from the readme.

Portability / POSIX compliance

I would expect people to run the script on shells other than bash. I myself use zsh, and it's certainly quite popular in the web development community. As such I think it's important to make the script as portable as possible.

I just gave it a run on zsh and it's totally failing. So we need to fix it and make it work on the various shells out there. I did some research and I've already committed some stuff. I'll just dump the links here if it's any useful. They're all about bash technically, but you'll often find POSIX-compliant solutions to stuff.

http://andreinc.net/2011/09/04/bash-scripting-best-practice/
http://mywiki.wooledge.org/BashPitfalls
http://mywiki.wooledge.org/BashFAQ

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.