From 10d073dcfb7823347e9b0e3d8ac760505ec67380 Mon Sep 17 00:00:00 2001 From: Jonas L Date: Sun, 17 Oct 2021 17:29:52 +0200 Subject: [PATCH] chore: Remove dev_tools (#1384) --- dev_tools/README_TRANSLATIONS | 11 - dev_tools/auto_schedule_show.php | 192 ------------------ .../bootstrap_development_environment.sh | 7 - dev_tools/compare_cc_files_to_fs.py | 140 ------------- .../liquidsoap_compile/liquidsoap-compile.sh | 123 ----------- dev_tools/liquidsoap_compile/run.sh | 162 --------------- dev_tools/populate-cc_files.php | 20 -- dev_tools/postCommitBuildTrigger.sh | 24 --- dev_tools/scripts/git-attributes-git-merge-po | 2 - dev_tools/scripts/git-config-git-merge-po | 3 - dev_tools/scripts/git-merge-po | 45 ---- dev_tools/toggle-pypo-debug.sh | 37 ---- dev_tools/update_po_files.sh | 19 -- 13 files changed, 785 deletions(-) delete mode 100644 dev_tools/README_TRANSLATIONS delete mode 100644 dev_tools/auto_schedule_show.php delete mode 100755 dev_tools/bootstrap_development_environment.sh delete mode 100644 dev_tools/compare_cc_files_to_fs.py delete mode 100755 dev_tools/liquidsoap_compile/liquidsoap-compile.sh delete mode 100755 dev_tools/liquidsoap_compile/run.sh delete mode 100644 dev_tools/populate-cc_files.php delete mode 100755 dev_tools/postCommitBuildTrigger.sh delete mode 100644 dev_tools/scripts/git-attributes-git-merge-po delete mode 100644 dev_tools/scripts/git-config-git-merge-po delete mode 100755 dev_tools/scripts/git-merge-po delete mode 100755 dev_tools/toggle-pypo-debug.sh delete mode 100755 dev_tools/update_po_files.sh diff --git a/dev_tools/README_TRANSLATIONS b/dev_tools/README_TRANSLATIONS deleted file mode 100644 index 71adfb32f..000000000 --- a/dev_tools/README_TRANSLATIONS +++ /dev/null @@ -1,11 +0,0 @@ -Last updated: September 4, 2015 - -To update the Airtime translations: - -- Make sure you run bootstrap_development_environment.sh as root once to set up this magic git merge driver for PO files. -- Run update_po_files.sh -- Commit the updated files. -- Push to GitHub. -- Transifex will then pick up the updated files in about 24 hours, and they'll be available for translation there. -- After translators have updated strings, they'll be automatically downloaded and committed to our git repo by - a script running here at Sourcefabric (contact Andrey). diff --git a/dev_tools/auto_schedule_show.php b/dev_tools/auto_schedule_show.php deleted file mode 100644 index 82abe7eeb..000000000 --- a/dev_tools/auto_schedule_show.php +++ /dev/null @@ -1,192 +0,0 @@ -format("Y-m-d H:i:s"); - - $columns = "(starts, ends, show_id, record, rebroadcast, instance_id, file_id, time_filled, last_scheduled, modified_instance)"; - $values = "('$starts', '$ends', $show_id, 0, 0, NULL, NULL, TIMESTAMP '$ends' - TIMESTAMP '$starts', '$now', 'f')"; - $query = "INSERT INTO cc_show_instances $columns values $values "; - echo $query.PHP_EOL; - - $result = query($conn, $query); - - $query = "SELECT currval('cc_show_instances_id_seq');"; - $result = pg_query($conn, $query); - if (!$result) { - echo "Error executing query $query.\n"; - exit(1); - } - - while ($row = pg_fetch_array($result)) { - $show_instance_id = $row["currval"]; - } - - return $show_instance_id; -} - -/* - * id | starts | ends | file_id | clip_length| fade_in | fade_out | cue_in | cue_out | media_item_played | instance_id - * 1 | 2012-02-29 23:25:00 | 2012-02-29 23:30:05.037166 | 1 | 00:05:05.037166 | 00:00:00 | 00:00:00 | 00:00:00 | 00:05:05.037166 | f | 5 - */ -function insertIntoCcSchedule($conn, $files, $show_instance_id, $p_starts, $p_ends){ - $columns = "(starts, ends, file_id, clip_length, fade_in, fade_out, cue_in, cue_out, media_item_played, instance_id)"; - - $starts = $p_starts; - - foreach($files as $file){ - - $endsDateTime = new DateTime($starts, new DateTimeZone("UTC")); - $lengthDateInterval = getDateInterval($file["length"]); - $endsDateTime->add($lengthDateInterval); - $ends = $endsDateTime->format("Y-m-d H:i:s"); - - $values = "('$starts', '$ends', $file[id], '$file[length]', '00:00:00', '00:00:00', '00:00:00', '$file[length]', 'f', $show_instance_id)"; - $query = "INSERT INTO cc_schedule $columns VALUES $values"; - echo $query.PHP_EOL; - - $starts = $ends; - $result = query($conn, $query); - } -} - -function getDateInterval($interval){ - list($length,) = explode(".", $interval); - list($hour, $min, $sec) = explode(":", $length); - return new DateInterval("PT{$hour}H{$min}M{$sec}S"); -} - -function getEndTime($startDateTime, $p_files){ - foreach ($p_files as $file){ - $startDateTime->add(getDateInterval($file['length'])); - } - - return $startDateTime; -} - -function rabbitMqNotify(){ - $ini_file = parse_ini_file("/etc/airtime/airtime.conf", true); - $url = "http://localhost/api/rabbitmq-do-push/format/json/api_key/".$ini_file["general"]["api_key"]; - - echo "Contacting $url".PHP_EOL; - $ch = curl_init($url); - curl_exec($ch); - curl_close($ch); -} - -$conn = pg_connect("host=localhost port=5432 dbname=airtime user=airtime password=airtime"); -if (!$conn) { - echo "Couldn't connect to Airtime DB.\n"; - exit(1); -} - -if (count($argv) > 1){ - if ($argv[1] == "--clean"){ - $tables = array("cc_schedule", "cc_show_instances", "cc_show"); - - foreach($tables as $table){ - $query = "DELETE FROM $table"; - echo $query.PHP_EOL; - query($conn, $query); - } - rabbitMqNotify(); - exit(0); - } else { - $str = <<format("Y-m-d H:i:s"); -//$ends = $endDateTime->format("Y-m-d H:i:s"); - -$files = getFileFromCcFiles($conn); -$show_id = insertIntoCcShow($conn); - -$endDateTime = getEndTime(clone $startDateTime, $files); -$ends = $endDateTime->format("Y-m-d H:i:s"); - -$show_instance_id = insertIntoCcShowInstances($conn, $show_id, $starts, $ends, $files); -insertIntoCcSchedule($conn, $files, $show_instance_id, $starts, $ends); - -rabbitMqNotify(); - -echo PHP_EOL."Show scheduled for $starts (UTC)".PHP_EOL; diff --git a/dev_tools/bootstrap_development_environment.sh b/dev_tools/bootstrap_development_environment.sh deleted file mode 100755 index 87abd88da..000000000 --- a/dev_tools/bootstrap_development_environment.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -# Set up 3 way PO file merging, which we need for non-mainline branches -cp scripts/git-merge-po /usr/local/bin -chmod +x /usr/local/bin/git-merge-po -cat scripts/git-config-git-merge-po >> ../.git/config -cat scripts/git-attributes-git-merge-po >> ../.gitattributes diff --git a/dev_tools/compare_cc_files_to_fs.py b/dev_tools/compare_cc_files_to_fs.py deleted file mode 100644 index df0bb9d03..000000000 --- a/dev_tools/compare_cc_files_to_fs.py +++ /dev/null @@ -1,140 +0,0 @@ -import logging -import os -import shutil -import sys -import time -from subprocess import PIPE, Popen - -from api_clients import api_client as apc -from configobj import ConfigObj - -""" -The purpose of this script is that you can run it, and it will compare what the database has to what your filesystem -has. It will then report if there are any differences. It will *NOT* make any changes, unlike media-monitor which uses -similar code when it starts up (but then makes changes if something is different) -""" - - -class AirtimeMediaMonitorBootstrap: - - """AirtimeMediaMonitorBootstrap constructor - - Keyword Arguments: - logger -- reference to the media-monitor logging facility - pe -- reference to an instance of ProcessEvent - api_clients -- reference of api_clients to communicate with airtime-server - """ - - def __init__(self): - config = ConfigObj("/etc/airtime/airtime.conf") - self.api_client = apc.api_client_factory(config) - - """ - try: - logging.config.fileConfig("logging.cfg") - except Exception, e: - print 'Error configuring logging: ', e - sys.exit(1) - """ - - self.logger = logging.getLogger() - self.logger.info("Adding %s on watch list...", "xxx") - - self.scan() - - """On bootup we want to scan all directories and look for files that - weren't there or files that changed before media-monitor process - went offline. - """ - - def scan(self): - directories = self.get_list_of_watched_dirs() - - self.logger.info("watched directories found: %s", directories) - - for id, dir in directories.iteritems(): - self.logger.debug("%s, %s", id, dir) - # CHANGED!!! - # self.sync_database_to_filesystem(id, api_client.encode_to(dir, "utf-8")) - self.sync_database_to_filesystem(id, dir) - - """Gets a list of files that the Airtime database knows for a specific directory. - You need to provide the directory's row ID, which is obtained when calling - get_list_of_watched_dirs function. - dir_id -- row id of the directory in the cc_watched_dirs database table - """ - - def list_db_files(self, dir_id): - return self.api_client.list_all_db_files(dir_id) - - """ - returns the path and the database row id for this path for all watched directories. Also - returns the Stor directory, which can be identified by its row id (always has value of "1") - """ - - def get_list_of_watched_dirs(self): - json = self.api_client.list_all_watched_dirs() - return json["dirs"] - - def scan_dir_for_existing_files(self, dir): - command = ( - 'find "%s" -type f -iname "*.ogg" -o -iname "*.mp3" -readable' - % dir.replace('"', '\\"') - ) - self.logger.debug(command) - # CHANGED!! - stdout = self.exec_command(command).decode("UTF-8") - - return stdout.splitlines() - - def exec_command(self, command): - p = Popen(command, shell=True, stdout=PIPE, stderr=PIPE) - stdout, stderr = p.communicate() - if p.returncode != 0: - self.logger.warn( - "command \n%s\n return with a non-zero return value", command - ) - self.logger.error(stderr) - return stdout - - """ - This function takes in a path name provided by the database (and its corresponding row id) - and reads the list of files in the local file system. Its purpose is to discover which files - exist on the file system but not in the database and vice versa, as well as which files have - been modified since the database was last updated. In each case, this method will call an - appropriate method to ensure that the database actually represents the filesystem. - dir_id -- row id of the directory in the cc_watched_dirs database table - dir -- pathname of the directory - """ - - def sync_database_to_filesystem(self, dir_id, dir): - """ - set to hold new and/or modified files. We use a set to make it ok if files are added - twice. This is because some of the tests for new files return result sets that are not - mutually exclusive from each other. - """ - db_known_files_set = set() - - files = self.list_db_files(dir_id) - for file in files["files"]: - db_known_files_set.add(file) - - existing_files = self.scan_dir_for_existing_files(dir) - - existing_files_set = set() - for file_path in existing_files: - if len(file_path.strip(" \n")) > 0: - existing_files_set.add(file_path[len(dir) :]) - - deleted_files_set = db_known_files_set - existing_files_set - new_files_set = existing_files_set - db_known_files_set - - print("DB Known files: \n%s\n\n" % len(db_known_files_set)) - print("FS Known files: \n%s\n\n" % len(existing_files_set)) - - print("Deleted files: \n%s\n\n" % deleted_files_set) - print("New files: \n%s\n\n" % new_files_set) - - -if __name__ == "__main__": - AirtimeMediaMonitorBootstrap() diff --git a/dev_tools/liquidsoap_compile/liquidsoap-compile.sh b/dev_tools/liquidsoap_compile/liquidsoap-compile.sh deleted file mode 100755 index f59a52e69..000000000 --- a/dev_tools/liquidsoap_compile/liquidsoap-compile.sh +++ /dev/null @@ -1,123 +0,0 @@ -#!/usr/bin/env bash - -set -e - -apt-get install -y --force-yes lsb-release sudo -dist=$(lsb_release -is) -code=$(lsb_release -cs) -# cpu=$(getconf LONG_BIT) -# cpuvalue= - -#enable apt.sourcefabric.org source -set +e -grep -E "deb http://apt.sourcefabric.org $code main" /etc/apt/sources.list -returncode=$? -set -e -if [ "$returncode" -ne "0" ]; then - echo "deb http://apt.sourcefabric.org $code main" >> /etc/apt/sources.list -fi -apt-get update -apt-get -y --force-yes install sourcefabric-keyring -apt-get update - -if [ "$dist" = "Ubuntu" ]; then - set +e - grep -E "deb http://ca.archive.ubuntu.com/ubuntu/ $code multiverse" /etc/apt/sources.list - returncode=$? - set -e - if [ "$returncode" -ne "0" ]; then - echo "deb http://ca.archive.ubuntu.com/ubuntu/ $code multiverse" >> /etc/apt/sources.list - echo "deb http://ca.archive.ubuntu.com/ubuntu/ $code universe" >> /etc/apt/sources.list - fi -fi - -#enable squeeze backports to get lame packages -if [[ "$dist" == "Debian" && "$code" == "squeeze" ]]; then - set +e - grep -E "deb http://backports.debian.org/debian-backports squeeze-backports main" /etc/apt/sources.list - returncode=$? - set -e - if [ "$returncode" -ne "0" ]; then - echo "deb http://backports.debian.org/debian-backports squeeze-backports main" >> /etc/apt/sources.list - fi -fi - -# echo "System is $cpu bit..." -# if [ "$cpu" = "64" ]; then -# cpuvalue="amd64" -# else -# cpuvalue="i386" -# fi - -apt-get update -apt-get -o Dpkg::Options::="--force-confold" upgrade -apt-get -y --force-yes install libopus0 libopus-dev libopus-dbg libopus-doc -#obsoleted code start -#apt-get -y --force-yes install wget -#rm -f libopu* -#rm -f aacplus* -#wget http://apt.sourcefabric.org/misc/libopus_1.0.1/libopus-dbg_1.0.1~$code~sfo-1_$cpuvalue.deb -#wget http://apt.sourcefabric.org/misc/libopus_1.0.1/libopus-dev_1.0.1~$code~sfo-1_$cpuvalue.deb -#wget http://apt.sourcefabric.org/misc/libopus_1.0.1/libopus0_1.0.1~$code~sfo-1_$cpuvalue.deb -#wget http://packages.medibuntu.org/pool/free/a/aacplusenc/aacplusenc_0.17.5-0.0medibuntu1_$cpuvalue.deb -#obsoleted code end - -apt-get -y --force-yes install git-core ocaml-findlib libao-ocaml-dev \ - libportaudio-ocaml-dev libmad-ocaml-dev libtaglib-ocaml-dev libalsa-ocaml-dev \ - libvorbis-ocaml-dev libladspa-ocaml-dev libxmlplaylist-ocaml-dev libflac-dev \ - libxml-dom-perl libxml-dom-xpath-perl patch autoconf libmp3lame-dev \ - libcamomile-ocaml-dev libcamlimages-ocaml-dev libtool libpulse-dev camlidl \ - libfaad-dev libpcre-ocaml-dev libfftw3-3 dialog - -if [ "$code" != "lucid" ]; then - apt-get -y --force-yes install libvo-aacenc-dev -fi - -#dpkg -i libopus-dbg_1.0.1~$code~sfo-1_$cpuvalue.deb libopus-dev_1.0.1~$code~sfo-1_$cpuvalue.deb libopus0_1.0.1~$code~sfo-1_$cpuvalue.deb aacplusenc_0.17.5-0.0medibuntu1_$cpuvalue.deb - -#for aac+ -#rm -rf libaac* -#apt-get -y --force-yes install libfftw3-dev pkg-config autoconf automake libtool unzip -#wget http://217.20.164.161/~tipok/aacplus/libaacplus-2.0.2.tar.gz -#tar -xzf libaacplus-2.0.2.tar.gz -#cd libaacplus-2.0.2 -#./autogen.sh --enable-shared --enable-static -#make -#make install -#ldconfig -#cd .. -#end of aac+ - -rm -rf liquidsoap-full -git clone https://github.com/savonet/liquidsoap-full -cd liquidsoap-full -git checkout master -make init -make update - -#tmp -#cd liquidsoap -#git checkout ifdef-encoder -#git merge master -#cd .. -#tmp end - -cp PACKAGES.minimal PACKAGES - -sed -i "s/#ocaml-portaudio/ocaml-portaudio/g" PACKAGES -sed -i "s/#ocaml-alsa/ocaml-alsa/g" PACKAGES -sed -i "s/#ocaml-pulseaudio/ocaml-pulseaudio/g" PACKAGES -sed -i "s/#ocaml-faad/ocaml-faad/g" PACKAGES -sed -i "s/#ocaml-opus/ocaml-opus/g" PACKAGES -#sed -i "s/#ocaml-aacplus/ocaml-aacplus/g" PACKAGES -#sed -i "s/#ocaml-shine/ocaml-shine/g" PACKAGES -if [ "$code" != "lucid" ]; then - sed -i "s/#ocaml-voaacenc/ocaml-voaacenc/g" PACKAGES -fi - -chown -R tmp /liquidsoap-full -chmod -R 777 /liquidsoap-full -sudo -u tmp ./bootstrap -sudo -u tmp ./configure -sudo -u tmp make -cp /liquidsoap-full/liquidsoap/src/liquidsoap / diff --git a/dev_tools/liquidsoap_compile/run.sh b/dev_tools/liquidsoap_compile/run.sh deleted file mode 100755 index d5d9b944f..000000000 --- a/dev_tools/liquidsoap_compile/run.sh +++ /dev/null @@ -1,162 +0,0 @@ -#!/usr/bin/env bash - -exec 2>&1 - -ROOT_UID="0" - -#Check if run as root -if [ "$UID" -ne "$ROOT_UID" ]; then - echo "You must have 'sudo' right to do that!" - exit 1 -fi - -rm -rf ./liquidsoap-compile_logs -mkdir -p ./liquidsoap-compile_logs - -showhelp() { - echo "Usage: run.sh [options] [parameters] --c all|ubuntu_lucid_32 Compile liquidsoap on all platforms or specified platform. --b all|ubuntu_lucid_32 Build shroot environments for all platforms or specified platform. --u username Local username will be used as sudo user of chroot env. Must be assigned before -b options" - exit 0 -} - -build_env() { - if [ $sudo_user = "-1" ]; then - echo "Please use -u to assign sudo username before build environments." - exit 1 - fi - - echo "build_env $1" - #exec > >(tee ./liquidsoap_compile_logs/build_env_$1.log) - os=$(echo $1 | awk '/(debian)/') - cpu=$(echo $1 | awk '/(64)/') - dist=$(echo $1 | awk -F "_" '{print $2}') - - rm -f /etc/schroot/chroot.d/$1.conf - if cat /etc/passwd | awk -F:'{print $1}' | grep "tmp" > /dev/null 2>&1; then - echo "User tmp exists." - else - useradd tmp - echo "User tmp is created." - fi - - apt-get update - apt-get --force-yes -y install debootstrap dchroot - echo [$1] > /etc/schroot/chroot.d/$1.conf - echo description=$1 >> /etc/schroot/chroot.d/$1.conf - echo directory=/srv/chroot/$1 >> /etc/schroot/chroot.d/$1.conf - echo type=directory >> /etc/schroot/chroot.d/$1.conf - echo users=$sudo_user,tmp >> /etc/schroot/chroot.d/$1.conf - echo root-users=$sudo_user >> /etc/schroot/chroot.d/$1.conf - rm -rf /srv/chroot/$1 - mkdir -p /srv/chroot/$1 - - #cp liquidsoap_compile.sh /srv/chroot/$1/ - if [ "$os" = "" ]; then - if [ "$cpu" = "" ]; then - echo "debootstrap --variant=buildd --arch=i386 $dist /srv/chroot/$1 http://archive.ubuntu.com/ubuntu/" - debootstrap --variant=buildd --arch=i386 $dist /srv/chroot/$1 http://archive.ubuntu.com/ubuntu/ - else - echo "debootstrap --variant=buildd --arch=amd64 $dist /srv/chroot/$1 http://archive.ubuntu.com/ubuntu/" - debootstrap --variant=buildd --arch=amd64 $dist /srv/chroot/$1 http://archive.ubuntu.com/ubuntu/ - fi - else - if [ "$cpu" = "" ]; then - echo "debootstrap --variant=buildd --arch=i386 $dist /srv/chroot/$1 http://ftp.debian.com/debian/" - debootstrap --variant=buildd --arch=i386 $dist /srv/chroot/$1 http://ftp.debian.com/debian/ - else - echo "debootstrap --variant=buildd --arch=amd64 $dist /srv/chroot/$1 http://ftp.debian.com/debian/" - debootstrap --variant=buildd --arch=amd64 $dist /srv/chroot/$1 http://ftp.debian.com/debian/ - fi - fi - -} - -compile_liq() { - echo "complie_liq $1" - #exec > >(tee ./liquidsoap_compile_logs/compile_liq_$1.log) - binfilename=$(echo $1 | sed -e 's/ubuntu/liquidsoap/g' -e 's/debian/liquidsoap/g' -e 's/32/i386/g' -e 's/64/amd64/g') - rm -f /srv/chroot/$1/liquidsoap-compile.sh - rm -f /srv/chroot/$1/liquidsoap - cp liquidsoap-compile.sh /srv/chroot/$1/ - schroot -c $1 -u root -d / -- /liquidsoap-compile.sh - cp /srv/chroot/$1/liquidsoap ./$binfilename - if [ $? = 0 ]; then - echo "$binfilename is generated successfully" - else - mv ./liquidsoap-compile_logs/compile_liq_$1.log ./liquidsoap-compile_logs/fail_to_compile_liq_$1.log - fi -} - -os_versions=("ubuntu_lucid_32" "ubuntu_lucid_64" "ubuntu_precise_32" "ubuntu_precise_64" "ubuntu_quantal_32" "ubuntu_quantal_64" "ubuntu_raring_32" "ubuntu_raring_64" "debian_squeeze_32" "debian_squeeze_64" "debian_wheezy_32" "debian_wheezy_64") - -num=${#os_versions[@]} -flag= -os= -sudo_user="-1" - -if [ x$1 = x ]; then - showhelp -fi - -while getopts b:c:u: arg; do - case $arg in - b) - if [ "$OPTARG" = "all" ]; then - echo "Building all platforms on server..." - for i in $(seq 0 $((num - 1))); do - build_env ${os_versions[$i]} | tee ./liquidsoap-compile_logs/build_env_${os_versions[$i]}.log - done - else - flag=1 - for i in $(seq 0 $((num - 1))); do - if [ "$OPTARG" = ${os_versions[$i]} ]; then - echo "Building platform: $OPTARG ..." - build_env ${os_versions[$i]} | tee ./liquidsoap-compile_logs/build_env_${os_versions[$i]}.log - flag=0 - fi - done - if [ $flag = 1 ]; then - echo "Unsupported Platform from:" - for j in "${os_versions[@]}"; do - echo $j - done - exit 1 - fi - fi - ;; - c) - if [ "$OPTARG" = "all" ]; then - echo "Compiling liquidsoap for all platforms on server..." - for i in $(seq 0 $((num - 1))); do - compile_liq ${os_versions[$i]} | tee ./liquidsoap-compile_logs/compile_liq_${os_versions[$i]}.log - done - - else - flag=1 - for i in $(seq 0 $((num - 1))); do - if [ "$OPTARG" = ${os_versions[$i]} ]; then - echo "Compiling liquidsoap for platform: $OPTARG ..." - compile_liq ${os_versions[$i]} | tee ./liquidsoap-compile_logs/compile_liq_${os_versions[$i]}.log - flag=0 - fi - done - if [ $flag = 1 ]; then - echo "Unsupported Platform from:" - for k in "${os_versions[@]}"; do - echo $k - done - exit 1 - fi - fi - ;; - u) - sudo_user="$OPTARG" - echo "sudo_user is set as $sudo_user." - ;; - ?) - showhelp - ;; - esac -done diff --git a/dev_tools/populate-cc_files.php b/dev_tools/populate-cc_files.php deleted file mode 100644 index 9f5bbc63b..000000000 --- a/dev_tools/populate-cc_files.php +++ /dev/null @@ -1,20 +0,0 @@ - $header - -# Merge files, then repair header -temp=$(mktemp /tmp/merge-po.XXXX) -msgcat -o $temp $A $B -msgcat --use-first -o $A $header $temp - -# Clean up -rm $header $temp - -# Check for conflicts -conflicts=$(grep -c "#-#" $A) -test $conflicts -gt 0 && exit 1 -exit 0 diff --git a/dev_tools/toggle-pypo-debug.sh b/dev_tools/toggle-pypo-debug.sh deleted file mode 100755 index 6f5bfbeaa..000000000 --- a/dev_tools/toggle-pypo-debug.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash -if [[ $EUID -ne 0 ]]; then - echo "This script must be run as root." 1>&2 - exit 1 -fi - -usage() { - echo "Use --enable or --disable flag. Enable is to set up environment" - echo "for specified user. --disable is to reset it back to pypo user" -} - -if [ "$1" = "--enable" ]; then - - /etc/init.d/libretime-playout stop - /etc/init.d/libretime-playout start-liquidsoap - - user=$2 - - echo "Changing ownership to user $1" - chmod -R a+rw /var/log/airtime/pypo - chmod a+r /etc/airtime/airtime.conf - chown -Rv $user:$user /var/tmp/airtime/pypo/ - chmod -v a+r /etc/airtime/api_client.cfg -elif [ "$1" = "--disable" ]; then - - user="pypo" - - echo "Changing ownership to user $1" - chmod 644 /etc/airtime/airtime.conf - chown -Rv $user:$user /var/tmp/airtime/pypo/ - chmod -v a+r /etc/airtime/api_client.cfg - - /etc/init.d/libretime-playout stop-liquidsoap - /etc/init.d/libretime-playout start -else - usage -fi diff --git a/dev_tools/update_po_files.sh b/dev_tools/update_po_files.sh deleted file mode 100755 index 3c85a7df6..000000000 --- a/dev_tools/update_po_files.sh +++ /dev/null @@ -1,19 +0,0 @@ -#! /bin/bash - -cd .. - -#generate a new .po file -#this will generate a file called messages.po -find legacy -print0 -iname "*.phtml" -o -name "*.php" | xargs xgettext -L php --from-code=UTF-8 -find legacy -print0 -iname "*.phtml" -o -name "*.php" | xargs xgettext -L php --from-code=UTF-8 -k --keyword=_pro:1 -d pro --force-po - -#merge the new messages from messages.po into each existing .po file -#this will generate new .po files -find ./legacy/locale/ -name "airtime.po" -exec msgmerge -N -U --no-wrap "{}" messages.po \; -find ./legacy/locale/ -name "pro.po" -exec msgmerge -N -U --no-wrap "{}" pro.po \; - -#delete the old .po files -find ./legacy/locale/ -name "*.po~" -delete - -#delete the temporary po files we create in the root directory -rm ./*.po