Commit e8508f7b authored by Jakub Jirutka's avatar Jakub Jirutka

add .editorconfig and fix code formatting

parent 8a4680cc
# http://editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true
[apkbuild-gem-resolver.in]
indent_size = 2
indent_style = space
[apkbuild-pypi.in]
indent_size = 4
indent_style = space
...@@ -136,4 +136,3 @@ fi ...@@ -136,4 +136,3 @@ fi
abuild_opts="$recursive $keep" abuild_opts="$recursive $keep"
do_bump "$@" do_bump "$@"
...@@ -211,7 +211,7 @@ end ...@@ -211,7 +211,7 @@ end
class Update class Update
def initialize def initialize
@gems = {} @gems = {}
@deps = [] @deps = []
end end
......
...@@ -136,4 +136,3 @@ IFS=$oldifs ...@@ -136,4 +136,3 @@ IFS=$oldifs
do_verify "$@" || exit 1 do_verify "$@" || exit 1
$cmd "$@" $cmd "$@"
...@@ -15,32 +15,32 @@ ABUILD_CONF=${ABUILD_CONF:-"$sysconfdir/abuild.conf"} ...@@ -15,32 +15,32 @@ ABUILD_CONF=${ABUILD_CONF:-"$sysconfdir/abuild.conf"}
[ -f "$ABUILD_CONF" ] && . "$ABUILD_CONF" [ -f "$ABUILD_CONF" ] && . "$ABUILD_CONF"
default_colors() { default_colors() {
NORMAL="\033[1;0m" NORMAL="\033[1;0m"
STRONG="\033[1;1m" STRONG="\033[1;1m"
RED="\033[1;31m" RED="\033[1;31m"
GREEN="\033[1;32m" GREEN="\033[1;32m"
YELLOW="\033[1;33m" YELLOW="\033[1;33m"
BLUE="\033[1;34m" BLUE="\033[1;34m"
} }
default_colors default_colors
is_local() { is_local() {
case "$1" in case "$1" in
http://*|ftp://*|https://*|saveas-*://*) http://*|ftp://*|https://*|saveas-*://*)
return 1;; return 1;;
esac esac
return 0 return 0
} }
msg() { msg() {
local prompt="$GREEN>>>${NORMAL}" local prompt="$GREEN>>>${NORMAL}"
[ -z "$quiet" ] && printf "${prompt} $@\n" >&2 [ -z "$quiet" ] && printf "${prompt} $@\n" >&2
} }
error() { error() {
local prompt="$RED>>>${NORMAL}" local prompt="$RED>>>${NORMAL}"
printf "${prompt} $@\n" >&2 printf "${prompt} $@\n" >&2
} }
die() { die() {
...@@ -49,9 +49,9 @@ die() { ...@@ -49,9 +49,9 @@ die() {
} }
runpart() { runpart() {
local part=$1 local part=$1
msg "Running part $part" msg "Running part $part"
$part || die "$part failed" $part || die "$part failed"
} }
is_vserver() { is_vserver() {
...@@ -161,9 +161,9 @@ prepare_chroot() { ...@@ -161,9 +161,9 @@ prepare_chroot() {
msg "Generating buildlab signing keys..." msg "Generating buildlab signing keys..."
do_chroot_action "$path" su abuild -c "'abuild-keygen -ai'" do_chroot_action "$path" su abuild -c "'abuild-keygen -ai'"
msg "Setting up repository symlink..." msg "Setting up repository symlink..."
mkdir -p "$path"/home/abuild/.cache/apks mkdir -p "$path"/home/abuild/.cache/apks
do_chroot_action "$path" chown abuild:abuild /home/abuild/${src} do_chroot_action "$path" chown abuild:abuild /home/abuild/${src}
do_chroot_action "$path" ln -sf .cache/apks /home/abuild/repo do_chroot_action "$path" ln -sf .cache/apks /home/abuild/repo
...@@ -256,8 +256,8 @@ while getopts "chqCkp:v:m:a:b:u" opt; do ...@@ -256,8 +256,8 @@ while getopts "chqCkp:v:m:a:b:u" opt; do
case $opt in case $opt in
'c') default_colors 'c') default_colors
color_opt="-c";; color_opt="-c";;
'h') usage;; 'h') usage;;
'q') quiet="-q";; 'q') quiet="-q";;
'C') create="-c";; 'C') create="-c";;
'p') buildpath="$OPTARG";; 'p') buildpath="$OPTARG";;
'm') buildmirror="$OPTARG";; 'm') buildmirror="$OPTARG";;
...@@ -266,7 +266,7 @@ while getopts "chqCkp:v:m:a:b:u" opt; do ...@@ -266,7 +266,7 @@ while getopts "chqCkp:v:m:a:b:u" opt; do
'k') enablecache=1;; 'k') enablecache=1;;
'b') buildpkg="$OPTARG";; 'b') buildpkg="$OPTARG";;
'u') update="-u";; 'u') update="-u";;
esac esac
done done
shift $(( $OPTIND - 1 )) shift $(( $OPTIND - 1 ))
......
...@@ -155,7 +155,7 @@ newaport() { ...@@ -155,7 +155,7 @@ newaport() {
if [ -z "$makedepends" ] &&[ "$buildtype" = "python" ]; then if [ -z "$makedepends" ] &&[ "$buildtype" = "python" ]; then
makedepends="python-dev" makedepends="python-dev"
else else
makedepends="\$depends_dev" makedepends="\$depends_dev"
fi fi
# Replace pkgver in $source # Replace pkgver in $source
...@@ -329,4 +329,3 @@ while [ $# -gt 0 ]; do ...@@ -329,4 +329,3 @@ while [ $# -gt 0 ]; do
newaport $1 || exit 1 newaport $1 || exit 1
shift shift
done done
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment