Skip to content

Instantly share code, notes, and snippets.

@masayukig
Last active December 22, 2015 23:09
Show Gist options
  • Save masayukig/6545040 to your computer and use it in GitHub Desktop.
Save masayukig/6545040 to your computer and use it in GitHub Desktop.
a script for updating OpenStack sources of devstack
#!/bin/bash
STACK_DIR=/opt/stack
COMPONENTS=`cd ${STACK_DIR}; ls -1`
echo $COMPONENTS
for component in ${COMPONENTS}
do
echo ============ $component ===============
cd ${STACK_DIR}/$component
pwd
if [ ! -d .git ]; then
continue
fi
git status
git checkout master
git checkout .
git pull
cd ..
echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment