Skip to content
Snippets Groups Projects
Select Git revision
  • 07b6b1265b73bcb65da6d12dca3c28af23e44764
  • development default protected
  • 3.2.x-stable
  • prepare
  • 6b369dc5
  • 3.1.x-stable
  • 3.0.x-stable
  • 2.4.x-stable
  • v3.2.61
  • v3.2.60
  • v3.2.59
  • v3.2.54
  • v3.2.53
  • v3.2.52
  • v3.2.51
  • v3.2.48
  • v3.2.45
  • v3.2.44.3
  • v3.2.44
  • v3.2.40
  • v3.2.13
  • v3.2.9
  • v3.2.8
  • v3.2.7
  • v3.2.6
  • v3.2.5
  • v3.2.4
  • v3.2.3
28 results

CalamaresAddLibrary.cmake

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    liprepoctl.sh 1.24 KiB
    #!/bin/bash
    
    ACTION="$1"
    FILENAME="/etc/apt/sources.list.d/lipoffline.list"
    ONLINEFILENAME="/etc/apt/sources.list.d/liponline.list"
    ACTIVATED=`test -e "$FILENAME"`
    
    . /etc/lsb-release
    DIST_CODENAME=$DISTRIB_CODENAME
    DIST_VERSION=$DISTRIB_RELEASE
    
    function install_repo()
    {
    	echo "# offline repository of the linux install party
    deb [ arch=amd64 trusted=yes ] file://$1/archives-$DIST_CODENAME $DIST_CODENAME lip" > "$FILENAME"
    	echo "deb http://ftp.halifax.rwth-aachen.de/ubuntu/ impish main restricted universe multiverse
    deb http://ftp.halifax.rwth-aachen.de/ubuntu/ impish-security main restricted universe multiverse
    deb http://ftp.halifax.rwth-aachen.de/ubuntu/ impish-updates main restricted universe multiverse" > "$ONLINEFILENAME"
    }
    
    function uninstall_repo()
    {
    	rm -f "$FILENAME" "$ONLINEFILENAME"
    }
    
    case $ACTION in
    	"on")
    		if [ -z "$2" ]; then
    			echo "No repository location specified!"
    			exit 2
    		fi
    		install_repo "$2"
    		apt-get -o "Dir::Etc::SourceList=$FILENAME" update
    		echo "Repository is now active, remember to call \"$0 off\" to deactivate it when you are done."
    		;;
    	"off")
    		uninstall_repo
    		apt-get update
    		echo "Repository is now inactive."
    		;;
    	"check")
    		echo "State: $ACTIVATED"
    		;;
    	*)
    		echo "Unknown action $ACTION"
    		exit 1
    		;;
    esac