From b0ea9f4f46b755c15d5bb5fbb50c7a890c75147f Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Sun, 9 Apr 2017 12:22:40 +0200 Subject: [PATCH] status --- status_all | 14 ++++++++++++++ update_all | 16 ++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100755 status_all create mode 100755 update_all diff --git a/status_all b/status_all new file mode 100755 index 0000000..5515da2 --- /dev/null +++ b/status_all @@ -0,0 +1,14 @@ +#!/bin/bash + + +#for package in $() +for dir in /usr/share/gamewheel/*/ +do + dir_short_name=${dir%*/} + dir_short_name=${dir_short_name##*/} + + if [ -d "$dir/.git" ]; then + cd $dir + echo `echo "$dir_short_name: " && git fetch && git status | grep "\(clean\|Untracked files\|Changes not staged\|ahead.*commit\|behind.*commit\)" | sed "s/^.*\(clean\|Untracked files\|Changes not staged\|ahead.*commit\|behind.*commit\).*/\l\1 |/" | grep --color=always "\(changes not staged\|ahead.*commit\|clean\|untracked files\|behind.*commit\)"` + fi +done diff --git a/update_all b/update_all new file mode 100755 index 0000000..959358c --- /dev/null +++ b/update_all @@ -0,0 +1,16 @@ +#!/bin/bash + +#for package in $() +for dir in /usr/share/gamewheel/*/ +do + dir_short_name=${dir%*/} + dir_short_name=${dir_short_name##*/} + + if [ -d "$dir/.git" ]; then + echo "===========================starting============================ $dir_short_name" + cd $dir + git branch + git pull + echo "=============================done==============================" + fi +done