File indexing completed on 2024-10-13 13:02:02

0001 # frozen_string_literal: true
0002 #
0003 # Copyright (C) 2016 Harald Sitter <sitter@kde.org>
0004 #
0005 # This library is free software; you can redistribute it and/or
0006 # modify it under the terms of the GNU Lesser General Public
0007 # License as published by the Free Software Foundation; either
0008 # version 2.1 of the License, or (at your option) version 3, or any
0009 # later version accepted by the membership of KDE e.V. (or its
0010 # successor approved by the membership of KDE e.V.), which shall
0011 # act as a proxy defined in Section 6 of version 3 of the license.
0012 #
0013 # This library is distributed in the hope that it will be useful,
0014 # but WITHOUT ANY WARRANTY; without even the implied warranty of
0015 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0016 # Lesser General Public License for more details.
0017 #
0018 # You should have received a copy of the GNU Lesser General Public
0019 # License along with this library.  If not, see <http://www.gnu.org/licenses/>.
0020 
0021 require 'open-uri'
0022 
0023 data = open('http://archive.neon.kde.org/public.key').read
0024 IO.popen(['apt-key', 'add', '-'], 'w') do |io|
0025   io.puts(data)
0026   io.close_write
0027 end
0028 
0029 debline = 'deb http://archive.neon.kde.org/user xenial main'
0030 File.write('/etc/apt/sources.list.d/neon.list', debline)
0031 system('apt', 'update')
0032 
0033 Dir.mkdir('/usr/include/KF5')