You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
livecd-rootfs/live-build/ubuntu-core/hooks/400-create-apt-get-warning....

19 lines
389 B

#!/bin/sh
set -ex
echo "I: Creating warning to use snappy when apt-get is used"
PREFIX=binary/boot/filesystem.dir
mkdir -p $PREFIX/usr/local/bin
cat >$PREFIX/usr/local/bin/no-apt <<EOF
#!/bin/sh
echo "Ubuntu Core does not use apt-get, see 'snap --help'!"
EOF
chmod 755 $PREFIX/usr/local/bin/no-apt
for cmd in apt apt-cache apt-get; do
ln -s no-apt $PREFIX/usr/local/bin/$cmd
done