Skip to content

Instantly share code, notes, and snippets.

@renan
Last active August 29, 2015 14:07
Show Gist options
  • Save renan/df1a8a6fe9772f6c74a1 to your computer and use it in GitHub Desktop.
Save renan/df1a8a6fe9772f6c74a1 to your computer and use it in GitHub Desktop.
Horde Packages with missing required for Composer or PEAR
#!/bin/bash
packages=(
ActiveSync Alarm Argv Auth Browser Cli Compress Core Crypt Data Date Dav
Exception Form Icalendar Image Imap_Client Imsp Itip Kolab_Cli Kolab_FreeBusy
Kolab_Resource Kolab_Storage ListHeaders LoginTasks Mail Mime Mime_Viewer
Model Nls Perms Prefs Push Rpc Service_Facebook Service_Scribd Service_Weather
Share Smtp SyncMl Text_Filter Vfs
)
for package in ${packages[*]}
do
file=./framework/$package/composer.json
if [ ! -f "$file" ]
then
echo "Missing composer.json on $file"
else
found=$(fgrep '"pear-pear.horde.org/Horde_Translation": ">=2.2.0@stable,<=3.0.0alpha1@stable"' $file)
if [ -z "$found" ]
then
echo "Missing on Composer on $file"
fi
fi
file=./framework/$package/package.xml
if [ ! -f "$file" ]
then
echo "Missing package.xml on $file"
else
found=$(fgrep -A2 '<name>Horde_Translation</name>' $file | grep '<min>2.2.0</min>')
if [ -z "$found" ]
then
echo "Missing on PEAR on $file"
fi
found=$(fgrep -A1 '<file name="Translation.php" role="php">' $file | grep '<tasks:replace from="@data_dir@" to="data_dir" type="pear-config" />')
if [ -z "$found" ]
then
echo "Missing Replace Task on $file"
fi
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment