1
0
mirror of https://github.com/QSCTech/zjunet.git synced 2026-01-22 19:54:48 +08:00
zjunet/miscellaneous/zjunet-postinst

32 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

2015-02-08 22:35:28 +08:00
#!/bin/sh
command -v apt-key 2>&1 >/dev/null && [ -d /etc/apt ] && {
cp /usr/share/zjunet/qsc.list /etc/apt/sources.list.d/qsc.list
chmod 644 /etc/apt/sources.list.d/qsc.list
apt-key add /usr/share/zjunet/qsc.public.key 2>&1 >/dev/null || true
echo "Added apt list."
}
command -v rpm 2>&1 >/dev/null && [ -d /etc/pki/rpm-gpg ] && [ -d /etc/yum.repos.d ] && {
cp /usr/share/zjunet/qsc.public.key /etc/pki/rpm-gpg/RPM-GPG-KEY-QSC-COMP66
chmod 644 /etc/pki/rpm-gpg/RPM-GPG-KEY-QSC-COMP66
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-QSC-COMP66 2>&1 >/dev/null || true
2015-02-08 22:35:28 +08:00
cp /usr/share/zjunet/qsc.repo /etc/yum.repos.d/qsc.repo || true
echo "Added yum repo."
}
cat <<BANNER
----------------------------------------------------------------------
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License Version 3 for more details.
You can ask questions, file a bug or make PRs here:
* https://github.com/QSCTech/zjunet
----------------------------------------------------------------------
BANNER