Created
July 14, 2016 11:42
-
-
Save vampy/09c1d57c6f834fef8d40cda36b8a5d75 to your computer and use it in GitHub Desktop.
Revisions
-
vampy created this gist
Jul 14, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ #!/bin/bash # Script to get all the PPA installed on a system for APT in `find /etc/apt/ -name \*.list`; do grep -Po "(?<=^deb\s).*?(?=#|$)" $APT | while read ENTRY ; do HOST=`echo $ENTRY | cut -d/ -f3` USER=`echo $ENTRY | cut -d/ -f4` PPA=`echo $ENTRY | cut -d/ -f5` #echo sudo apt-add-repository ppa:$USER/$PPA if [ "ppa.launchpad.net" = "$HOST" ]; then echo ppa:$USER/$PPA else echo \'${ENTRY}\' fi done done