Skip to content

Instantly share code, notes, and snippets.

@hasanbayatme
Last active December 28, 2020 00:14
Show Gist options
  • Save hasanbayatme/1dd5f59566e186907f99dc16badc382a to your computer and use it in GitHub Desktop.
Save hasanbayatme/1dd5f59566e186907f99dc16badc382a to your computer and use it in GitHub Desktop.

Revisions

  1. hasanbayatme revised this gist Jul 8, 2017. No changes.
  2. hasanbayatme revised this gist Jul 8, 2017. No changes.
  3. hasanbayatme renamed this gist Jul 8, 2017. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. hasanbayatme revised this gist Jul 8, 2017. 2 changed files with 2 additions and 2 deletions.
    2 changes: 1 addition & 1 deletion install-composer-global.sh
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@

    # Check if composer currently installed
    if hash composer; then
    echo "Composer Currently Installed"
    echo "Composer Already Installed"
    echo "You can find it at $(type -p composer)"
    exit
    fi
    2 changes: 1 addition & 1 deletion install-composer-user.sh
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@

    # Check if composer currently installed
    if hash composer; then
    echo "Composer Currently Installed"
    echo "Composer Already Installed"
    echo "You can find it at $(type -p composer)"
    exit
    fi
  5. hasanbayatme revised this gist Jul 8, 2017. 2 changed files with 12 additions and 10 deletions.
    11 changes: 6 additions & 5 deletions install-composer-global.sh
    Original file line number Diff line number Diff line change
    @@ -7,10 +7,10 @@
    ########################

    # Check if composer currently installed
    if which composer then
    if hash composer; then
    echo "Composer Currently Installed"
    echo "You can find it at " + type -a composer
    exit;
    echo "You can find it at $(type -p composer)"
    exit
    fi

    # Update package index
    @@ -25,5 +25,6 @@ sudo wget https://getcomposer.org/composer.phar
    # Move composer to /bin/composer
    sudo mv composer.phar /bin/composer

    echo "Composer Binary exists at /bin/composer"
    echo "Composer Installed Globally Successfully"
    echo "Composer Installed Globally Successfully"
    echo "Composer Installed at $(type -p composer)"
    echo "You can always find it by calling `type -p composer`"
    11 changes: 6 additions & 5 deletions install-composer-user.sh
    Original file line number Diff line number Diff line change
    @@ -7,10 +7,10 @@
    ########################

    # Check if composer currently installed
    if which composer then
    if hash composer; then
    echo "Composer Currently Installed"
    echo "You can find it at " + type -a composer
    exit;
    echo "You can find it at $(type -p composer)"
    exit
    fi

    # Update package index
    @@ -25,5 +25,6 @@ sudo wget https://getcomposer.org/composer.phar
    # Move composer to /usr/local/bin/composer
    sudo mv composer.phar /usr/local/bin/composer

    echo "Composer Binary exists at /user/local/bin/composer"
    echo "Composer Installed Locally Successfully"
    echo "Composer Installed Locally Successfully"
    echo "Composer Installed at $(type -p composer)"
    echo "You can always find it by calling `type -p composer`"
  6. hasanbayatme revised this gist Jul 8, 2017. 2 changed files with 2 additions and 2 deletions.
    2 changes: 1 addition & 1 deletion install-composer-global.sh
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@
    if which composer then
    echo "Composer Currently Installed"
    echo "You can find it at " + type -a composer
    exit
    exit;
    fi

    # Update package index
    2 changes: 1 addition & 1 deletion install-composer-user.sh
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@
    if which composer then
    echo "Composer Currently Installed"
    echo "You can find it at " + type -a composer
    exit
    exit;
    fi

    # Update package index
  7. hasanbayatme revised this gist Jul 8, 2017. 2 changed files with 22 additions and 2 deletions.
    12 changes: 11 additions & 1 deletion install-composer-global.sh
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,13 @@
    # License MIT @ Bayat
    ########################

    # Check if composer currently installed
    if which composer then
    echo "Composer Currently Installed"
    echo "You can find it at " + type -a composer
    exit
    fi

    # Update package index
    sudo apt update

    @@ -16,4 +23,7 @@ sudo apt install php php-cli
    sudo wget https://getcomposer.org/composer.phar

    # Move composer to /bin/composer
    sudo mv composer.phar /bin/composer
    sudo mv composer.phar /bin/composer

    echo "Composer Binary exists at /bin/composer"
    echo "Composer Installed Globally Successfully"
    12 changes: 11 additions & 1 deletion install-composer-user.sh
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,13 @@
    # License MIT @ Bayat
    ########################

    # Check if composer currently installed
    if which composer then
    echo "Composer Currently Installed"
    echo "You can find it at " + type -a composer
    exit
    fi

    # Update package index
    sudo apt update

    @@ -16,4 +23,7 @@ sudo apt install php php-cli
    sudo wget https://getcomposer.org/composer.phar

    # Move composer to /usr/local/bin/composer
    sudo mv composer.phar /usr/local/bin/composer
    sudo mv composer.phar /usr/local/bin/composer

    echo "Composer Binary exists at /user/local/bin/composer"
    echo "Composer Installed Locally Successfully"
  8. hasanbayatme revised this gist Jul 8, 2017. 3 changed files with 17 additions and 4 deletions.
    15 changes: 15 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    ## Installation

    Install composer locally (current user only):

    ```bash
    wget -O - https://gist.github.com/EmpireWorld/1dd5f59566e186907f99dc16badc382a/raw/install-composer-local.sh | bash
    ```

    Install composer globally (all users):

    ```bash
    wget -O - https://gist.github.com/EmpireWorld/1dd5f59566e186907f99dc16badc382a/raw/install-composer-global.sh | bash
    ```

    Made with :heart: by [Bayat](https://gist.github.com/EmpireWorld/)
    3 changes: 1 addition & 2 deletions install-composer-global.sh
    Original file line number Diff line number Diff line change
    @@ -3,8 +3,7 @@
    ########################
    # Written by Hasan Bayat
    # Installs composer for all users.
    # Just excuse the below command in your terminal to download and excuse this bash script:
    #
    # License MIT @ Bayat
    ########################

    # Update package index
    3 changes: 1 addition & 2 deletions install-composer-user.sh
    Original file line number Diff line number Diff line change
    @@ -3,8 +3,7 @@
    ########################
    # Written by Hasan Bayat
    # Installs composer for current user only.
    # Just excuse the below command in your terminal to download and excuse this bash script:
    #
    # License MIT @ Bayat
    ########################

    # Update package index
  9. hasanbayatme renamed this gist Jul 8, 2017. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  10. hasanbayatme created this gist Jul 8, 2017.
    20 changes: 20 additions & 0 deletions install-composer-global
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    #!/bin/bash

    ########################
    # Written by Hasan Bayat
    # Installs composer for all users.
    # Just excuse the below command in your terminal to download and excuse this bash script:
    #
    ########################

    # Update package index
    sudo apt update

    # Make sure php is installed
    sudo apt install php php-cli

    # Download latest composer snapshot and run it by php
    sudo wget https://getcomposer.org/composer.phar

    # Move composer to /bin/composer
    sudo mv composer.phar /bin/composer
    20 changes: 20 additions & 0 deletions install-composer-user.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    #!/bin/bash

    ########################
    # Written by Hasan Bayat
    # Installs composer for current user only.
    # Just excuse the below command in your terminal to download and excuse this bash script:
    #
    ########################

    # Update package index
    sudo apt update

    # Make sure php is installed
    sudo apt install php php-cli

    # Download latest composer snapshot and run it by php
    sudo wget https://getcomposer.org/composer.phar

    # Move composer to /usr/local/bin/composer
    sudo mv composer.phar /usr/local/bin/composer