summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXyem2021-12-14 00:35:59 +0000
committerXyem2021-12-14 00:35:59 +0000
commit7a1704d4c599eb05fb2a31f8e6401a51c447a239 (patch)
tree47fe82c5ed2629719cc4d26c3ff9da73cc9e0463
parent1dabcbd4d4b9d3d295a0bc0c5565413bef02a1fc (diff)
downloadaur-7a1704d4c599eb05fb2a31f8e6401a51c447a239.tar.gz
Change indentation from 4 space to 2 space
-rw-r--r--PKGBUILD2
-rw-r--r--geany-openscad.install40
2 files changed, 21 insertions, 21 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 3e1579f646a2..399f9a778f23 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -12,5 +12,5 @@ source=('http://www.thingiverse.com/download:479705')
sha256sums=('ceb2eb9dd54a879b93e6ba7645aecd668ff183d0705d07a9b863fdfa4560dac6')
package() {
- install -Dm644 'download:479705' "$pkgdir/usr/share/geany/filedefs/filetypes.OpenSCAD.conf"
+ install -Dm644 'download:479705' "$pkgdir/usr/share/geany/filedefs/filetypes.OpenSCAD.conf"
}
diff --git a/geany-openscad.install b/geany-openscad.install
index f02b7aface6f..60ae25c4fdee 100644
--- a/geany-openscad.install
+++ b/geany-openscad.install
@@ -7,29 +7,29 @@ declare -r key='OpenSCAD'
declare -r value='*.scad'
post_install() {
- # insert filetype line if it isn't present, otherwise replace it.
- if [ -z "`grep "^${key}=" "${file}"`" ] ; then
- local before="`sed -n "1,/^\[${heading}]/p" "${file}"`"
- local section="`sed "1,/^\[${heading}]/d;/^\s*$/,\\\$d" $file | \
- cat - <(echo "${key}=${value};") | \
- sort -f`"
- local after="`sed "1,/^\[${heading}]/d;1,/^\s*$/d" "${file}"`"
+ # insert filetype line if it isn't present, otherwise replace it.
+ if [ -z "`grep "^${key}=" "${file}"`" ] ; then
+ local before="`sed -n "1,/^\[${heading}]/p" "${file}"`"
+ local section="`sed "1,/^\[${heading}]/d;/^\s*$/,\\\$d" $file | \
+ cat - <(echo "${key}=${value};") | \
+ sort -f`"
+ local after="`sed "1,/^\[${heading}]/d;1,/^\s*$/d" "${file}"`"
- echo -e "${before}\n${section}\n\n${after}" > "${file}"
- else
- sed -i "s/^\(${key}=.*;\)/\1${value};/" "${file}"
- fi
- sed -i "s/^\(${category}=.*\)/\1${key};/" "${file}"
+ echo -e "${before}\n${section}\n\n${after}" > "${file}"
+ else
+ sed -i "s/^\(${key}=.*;\)/\1${value};/" "${file}"
+ fi
+ sed -i "s/^\(${category}=.*\)/\1${key};/" "${file}"
}
pre_remove() {
- # remove the *.scad pattern from the OpenSCAD file type.
- sed -i "s/^\(${key}=.*\)\\${value};/\1/" "${file}"
+ # remove the *.scad pattern from the OpenSCAD file type.
+ sed -i "s/^\(${key}=.*\)\\${value};/\1/" "${file}"
- # if the OpenSCAD file type has no other patterns,
- # remove it and its entry in the Script group.
- if [ -z "`grep "^${key}=.+" "${file}"`" ] ; then
- sed -i "/^${key}=/d" "${file}"
- sed -i "s/^\(${category}=.*\)${key};\(.*\)$/\1\2/" "${file}"
- fi
+ # if the OpenSCAD file type has no other patterns,
+ # remove it and its entry in the Script group.
+ if [ -z "`grep "^${key}=.+" "${file}"`" ] ; then
+ sed -i "/^${key}=/d" "${file}"
+ sed -i "s/^\(${category}=.*\)${key};\(.*\)$/\1\2/" "${file}"
+ fi
}