Skip to content
Snippets Groups Projects
Select Git revision
  • dcaf4d391cfe0d780e02a638a83c3156c9ae2dc5
  • master default protected
  • jul25_patches
  • nightly_master
  • online_mvd_readconf_cleanup protected
  • online_much_readconf_cleanup protected
  • cleanup_rich_v25a
  • jul24_patches
  • nov23_patches
  • DC_2404
  • nighly_master
  • DC_Jan24
  • DC_Nov23
  • DC_Oct23
  • feb23_patches
  • L1Algo-dev9
  • dec21_patches protected
  • apr21_patches protected
  • RC2_jul25
  • dev_2025_46
  • dev_2025_45
  • dev_2025_44
  • dev_2025_43
  • dev_2025_42
  • dev_2025_41
  • dev_2025_40
  • dev_2025_39
  • dev_2025_38
  • dev_2025_37
  • dev_2025_36
  • dev_2025_35
  • dev_2025_34
  • dev_2025_33
  • dev_2025_32
  • dev_2025_31
  • dev_2025_30
  • RC_jul25
  • dev_2025_29
38 results

connect_upstream_repo.sh

Blame
  • Eoin Clerkin's avatar
    Eoin Clerkin authored
    Inserts the declaration on the 1st or 2nd line of scripts.
    
    EMPTY LINE
    
    Short license declarations for .sh files
    
    Inserts the declaration on the 1st or 2nd line of scripts.
    
    EMPTY LINE
    
    Revert "Short license declarations for .sh files"
    
    This reverts commit d3dd8608dead032b12bc71798a2bd97bfca95442.
    
    Uses SPDX identifier
    
    Modifies declaration to use SPDX license identifier syntax
    
    Corrects file
    
    Empty line before hashbang removed
    6f6619b0
    History
    connect_upstream_repo.sh 720 B
    #!/bin/bash
    # Copyright (C) 2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
    # SPDX-License-Identifier: GPL-3.0-only
    # First commited by Florian Uhlig
    
    
    upstream_repo=$1
    
    bla=$(git remote -v | grep upstream)
    if [ $? -eq 0 ]; then
      echo "Remote link upstream already exist"
      bla=$(git remote -v | grep upstream | grep $upstream_repo)
      if [ $? -eq 0 ]; then
        echo "Remote link upstream already exist and points to the correct repo"
        # dont do anything
      else
        echo "Remote link upstream already exist and points to the wrong repo"
        git remote rm upstream
        git remote add upstream $upstream_repo
      fi
    else
      echo "Remote repo has to be connected"
      git remote add upstream $upstream_repo
    fi