blob: 47da72b395b31cbc78c1982b52d839f174bfc4ee (
plain)
- #!/bin/sh
- pathmatch="^/usr"
- while read debname; do
- pkg=$(dpkg --info $debname | sed -n 's/^ Package: *//p' | head -1)
- (dpkg -L "$pkg" 2>/dev/null || true) | grep "$pathmatch" |
- while read file; do
- [ -f "$file" -a ! -L "$file" ] || continue
- dir=`dirname "$file"`;
- base=`basename "$file"`;
- inode=`find "$file" -printf "%i\n"`
- [ -L "$dir/.${base}.dpkg-ro-used.$inode" ] || continue
- (cd "$dir" && ln "$base" ".${base}.dpkg-ro-used.$inode")
- echo "$dir/.${base}.dpkg-ro-used.$inode"
- done >>/var/lib/my_ro_hack.todel
- done
|