<commit_before>#!/usr/bin/env bash

set -e

REPO=common-shaders
PRGNAM=libretro-$REPO
TMP=${TMP:-/tmp}
PKG=$TMP/package-$REPO
BUILD=1dc

rm -rf $PKG
rm -rf $TMP/$REPO

mkdir -p $PKG
cd $TMP
git clone https://github.com/libretro/${REPO}.git
cd $REPO

chown -R root:root .
find -L . \
 \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
  -o -perm 511 \) -exec chmod 755 {} \; -o \
 \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
  -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;

CWD=`pwd`
VERSION=`git rev-parse --short HEAD`

mkdir -p $PKG/usr/share/libretro/shaders
find . -type f -maxdepth 1 -exec cp {} $PKG/usr/share/libretro/shaders \;
find . -type d -maxdepth 1 -not -name ".*" -exec cp -r {} $PKG/usr/share/libretro/shaders \;

cd $PKG
/sbin/makepkg -l y -c n $TMP/$PRGNAM-$VERSION-noarch-${BUILD}.txz<commit_msg>Docs are moved for common-shaders<commit_after>#!/usr/bin/env bash

set -e

REPO=common-shaders
PRGNAM=libretro-$REPO
TMP=${TMP:-/tmp}
PKG=$TMP/package-$REPO
BUILD=1dc

rm -rf $PKG
rm -rf $TMP/$REPO

mkdir -p $PKG
cd $TMP
git clone https://github.com/libretro/${REPO}.git
cd $REPO

chown -R root:root .
find -L . \
 \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
  -o -perm 511 \) -exec chmod 755 {} \; -o \
 \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
  -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;

CWD=`pwd`
VERSION=`git rev-parse --short HEAD`

# To make porting from here easier:
# http://bazaar.launchpad.net/~libretro/libretro/common-shaders/view/head:/debian/rules
SHADERSPATH=$PKG/usr/share/libretro/shaders
DOCPATH=$PKG/usr/doc/$PRGNAM-$VERSION

mkdir -p $PKG/usr/share/libretro/shaders
find . -type f -maxdepth 1 -exec cp {} $SHADERSPATH \;
find . -type d -maxdepth 1 -exec cp -r {} $SHADERSPATH \;

rm -r $SHADERSPATH/.git
rm -r $SHADERSPATH/docs

mkdir -p $DOCPATH
cp $CWD/docs/README $DOCPATH/
mv $SHADERSPATH/blurs/README.txt $DOCPATH/README-blurs
mv $SHADERSPATH/borders/README $DOCPATH/README-borders
mv $SHADERSPATH/crt/crt-royale/README.TXT $DOCPATH/README-crt-royale
mv $SHADERSPATH/crt/crt-royale/THANKS.TXT $DOCPATH/THANKS-crt-royale
rm $SHADERSPATH/crt/crt-royale/LICENSE.TXT
mv $SHADERSPATH/dithering/gdapt/README.md $DOCPATH/README-dithering_gdapt
mv $SHADERSPATH/dithering/mdapt/README.md $DOCPATH/README-dithering_mdapt
mv $SHADERSPATH/handheld/gameboy/README.md $DOCPATH/README-gameboy
mv $SHADERSPATH/handheld/lcd-shader/README.md $DOCPATH/README-lcd-shader
mv $SHADERSPATH/hqx/README.md $DOCPATH/README-hqx
mv $SHADERSPATH/srgb-helpers/README.txt $DOCPATH/README-srgb-helpers
mv $SHADERSPATH/windowed/README.md $DOCPATH/README-windowed

cd $PKG
/sbin/makepkg -l y -c n $TMP/$PRGNAM-$VERSION-noarch-${BUILD}.txz
{'fraction_non_alphanumeric': 0.1655147326300473, 'fraction_numerical': 0.03492178974172426, 'mean_word_length': 3.290171606864275, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5255839', 'n_tokens_mistral': 1300, 'n_tokens_neox': 1220, 'n_words': 275}