7efbc63a02f0e03b048c887a82cecc23f3d3ff76
[config/bash.git] / .bash / aliases.d / debian
1 #!/bin/bash
2
3 # Some debian specific aliases
4 if [ -x /usr/bin/fakeroot ] && [ -x /usr/bin/dpkg-repack ];
5 then
6   alias drepack='fakeroot -u dpkg-repack'
7 fi
8
9 if command -v aptitude &> /dev/null;
10 then
11   function aptitude-remove-dep()
12   {
13     PACKAGES=$(apt-cache showsrc "$1" | grep Build-Depends | perl -p -e 's/(?:[\[(].+?[\])]|Build-Depends:|,|\|)//g')
14     sudo aptitude markauto "$PACKAGES"
15   }
16   complete -F _aptitude -o default aptitude-remove-dep
17 fi
18
19 if command -v dpkg-buildpackage &>/dev/null;
20 then
21   alias debbbuild='dpkg-buildpackage -b -us -uc -tc'
22 fi
23
24 if command -v git &> /dev/null;
25 then
26   alias cdgit='cd $(git root)'
27 fi
28
29 if command -v cme &> /dev/null;
30 then
31   alias cme-deps='cme fix dpkg -from control -filter Depends'
32 fi