File: netplan.io.preinst

package info (click to toggle)
netplan.io 1.1.2-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,400 kB
  • sloc: python: 34,444; ansic: 13,683; xml: 4,989; javascript: 2,165; sh: 420; makefile: 118
file content (17 lines) | stat: -rw-r--r-- 587 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

set -e

# Cleanup .pyc cached files from netplan.io versions older than 0.107-3.
# After 0.107-3, the noncli-related code was moved away from
# share/netplan/netplan, thanks to the new python3-netplan package,
# but dpkg would leave this directory behind due to the .pyc files.
# Cleaning it up here will leave the directory empty so dpkg will remove
# it properly during the update process.

if [ -d /usr/share/netplan/netplan ]; then
    find /usr/share/netplan/netplan/ -name '*.pyc' -delete
    find /usr/share/netplan/netplan/ -name '__pycache__' -delete
fi

#DEBHELPER#