blob: 60d0f468e08b049a51e09b7626b65fdb15d77d99 [file] [log] [blame]
Dean Troyer9acc12a2013-08-09 15:09:31 -05001#!/usr/bin/env bash
2
3# **fixup_stuff.sh**
4
5# fixup_stuff.sh
6#
7# All distro and package specific hacks go in here
8# - prettytable 0.7.2 permissions are 600 in the package and
9# pip 1.4 doesn't fix it (1.3 did)
10# - httplib2 0.8 permissions are 600 in the package and
11# pip 1.4 doesn't fix it (1.3 did)
12
13# Keep track of the current directory
14TOOLS_DIR=$(cd $(dirname "$0") && pwd)
15TOP_DIR=`cd $TOOLS_DIR/..; pwd`
16
17# Change dir to top of devstack
18cd $TOP_DIR
19
20# Import common functions
21source $TOP_DIR/functions
22
23FILES=$TOP_DIR/files
24
25# Pre-install affected packages so we can fix the permissions
26sudo pip install prettytable
27sudo pip install httplib2
28
29SITE_DIRS=$(python -c "import site; import os; print os.linesep.join(site.getsitepackages())")
30for dir in $SITE_DIRS; do
31
32 # Fix prettytable 0.7.2 permissions
33 if [[ -r $dir/prettytable.py ]]; then
34 sudo chmod +r $dir/prettytable-0.7.2*/*
35 fi
36
37 # Fix httplib2 0.8 permissions
38 httplib_dir=httplib2-0.8.egg-info
39 if [[ -d $dir/$httplib_dir ]]; then
40 sudo chmod +r $dir/$httplib_dir/*
41 fi
42
43done