#!/bin/sh in_array() { local i needle needle=$1 shift 1 # array() undefined [ -z "$1" ] && return 1 for i in $* do echo $i |grep -q "^$needle" && return 0 done return 1 } if [ "$1" == "--help" ]; then echo "missing xorg packages" exit 1 fi if [ ! -d ../.git -o ! -d ../source ]; then echo "hey, where are you?" exit 1 fi cd .. skip=('xf86-video-impact is mips-only' 'xf86-video-wsfb is for *bsd' 'xf86-video-i810 is replaced by xf86-video-intel' 'mkcfm is removed by priyank' 'xkbdata is replaced by xkeyboard-config' 'xf86-video-glide makedepends on xfree86' 'constype is solaris-only' 'xf86-video-amd is replaced by xf86-video-geode' 'xf86-video-xgixp depends on unreleased libdrm') upstream=$(for i in app data doc driver font lib proto testdir util xserver do lynx -dump http://xorg.freedesktop.org/releases/individual/$i/|grep bz2$|sed 's|.*/\(.*\)-.*|\1|' done |sort -u |tr '[A-Z]' '[a-z]') for i in $upstream do if ! stat source/*/$i &>/dev/null && ! in_array $i ${skip[@]}; then echo $i fi done