moved edit_these.sh to conifg.sh - copy to defaults.sh, fixed issue with folders not counting properly after changing while running, randomized the color output, added svn stats to the powerline status bar, removed optimize_myisam from update_releases, combined all optimize scripts

This commit is contained in:
jonnyboy
2013-02-02 05:14:26 +01:00
parent 45ceb94a4c
commit 0915f610b4
18 changed files with 328 additions and 185 deletions
+11 -11
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
#this file can be used to save a put a time editing and reediting your edit_these.sh
#this file can be used to save a put a time editing and reediting your defaults.sh
#this file must be renamed to fix.sh, or else it will be overwritten with the next git pull
#then edit, add, remove anything see necessary
@@ -10,17 +10,17 @@
#now you have edited the file to update, updated and put you changes back.
if grep -q '/path/to/nzbs' "../edit_these.sh" ; then
sed -i -e 's/export NZBS=.*$/\export NZBS="\/home\/jonnyboy\/nzbs\/batch"/' ../edit_these.sh
sed -i -e 's/export OPTIMISE=.*$/export OPTIMISE="true"/' ../edit_these.sh
sed -i -e 's/export AGREED=.*$/export AGREED="yes"/' ../edit_these.sh
sed -i -e 's/export INNODB=.*$/export INNODB="false"/' ../edit_these.sh
sed -i -e 's/SLEEP=.*$/SLEEP="1"/' ../edit_these.sh
sed -i -e 's/export SHOW_WHY=.*$/export SHOW_WHY="false"/' ../edit_these.sh
sed -i -e 's/export PARSING=.*$/export PARSING="true"/' ../edit_these.sh
if grep -q '/path/to/nzbs' "../defaults.sh" ; then
sed -i -e 's/export NZBS=.*$/\export NZBS="\/home\/jonnyboy\/nzbs\/batch"/' ../defaults.sh
sed -i -e 's/export OPTIMISE=.*$/export OPTIMISE="true"/' ../defaults.sh
sed -i -e 's/export AGREED=.*$/export AGREED="yes"/' ../defaults.sh
sed -i -e 's/export INNODB=.*$/export INNODB="false"/' ../defaults.sh
sed -i -e 's/SLEEP=.*$/SLEEP="1"/' ../defaults.sh
sed -i -e 's/export SHOW_WHY=.*$/export SHOW_WHY="false"/' ../defaults.sh
sed -i -e 's/export PARSING=.*$/export PARSING="true"/' ../defaults.sh
sed -i -e 's/export PASSWORD=.*$/export PASSWORD="password"/' update_svn.sh
sed -i -e 's/RELEASES_SLEEP=.*$/RELEASES_SLEEP="20"/' ../edit_these.sh
sed -i -e 's/RELEASES_SLEEP=.*$/RELEASES_SLEEP="20"/' ../defaults.sh
else
rm ../edit_these.sh
rm ../defaults.sh
sed -i -e 's/export PASSWORD=.*$/export PASSWORD="password"/' update_svn.sh
fi
+1 -1
View File
@@ -9,7 +9,7 @@ do
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
source ../edit_these.sh
source ../defaults.sh
+2 -40
View File
@@ -9,52 +9,14 @@ do
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
source ../edit_these.sh
source ../defaults.sh
clear
if [[ $AGREED == "no" ]]; then
echo "Please edit the edit_these.sh file"
echo "Please edit the defaults.sh file"
exit
fi
echo -e "\033[38;5;148mEditing $NEWZPATH/www/lib/postprocess.php"
if [ ! -f $NEWZPATH/www/lib/postprocess.php.orig ]; then
cp $NEWZPATH/www/lib/postprocess.php $NEWZPATH/www/lib/postprocess.php.orig
fi
if ! grep -q '//$this->processAdditional();' "$NEWZPATH/www/lib/postprocess.php" ; then
$SED -i -e 's/$this->processAdditional();/\/\/$this->processAdditional();/' $NEWZPATH/www/lib/postprocess.php
fi
if ! grep -q '//$this->processNfos();' "$NEWZPATH/www/lib/postprocess.php" ; then
$SED -i -e 's/$this->processNfos();/\/\/$this->processNfos();/' $NEWZPATH/www/lib/postprocess.php
fi
if ! grep -q '//$this->processUnwanted();' "$NEWZPATH/www/lib/postprocess.php" ; then
$SED -i -e 's/$this->processUnwanted();/\/\/$this->processUnwanted();/' $NEWZPATH/www/lib/postprocess.php
fi
if ! grep -q '//$this->processMovies();' "$NEWZPATH/www/lib/postprocess.php" ; then
$SED -i -e 's/$this->processMovies();/\/\/$this->processMovies();/' $NEWZPATH/www/lib/postprocess.php
fi
if ! grep -q '//$this->processMusic();' "$NEWZPATH/www/lib/postprocess.php" ; then
$SED -i -e 's/$this->processMusic();/\/\/$this->processMusic();/' $NEWZPATH/www/lib/postprocess.php
fi
if ! grep -q '//$this->processBooks();' "$NEWZPATH/www/lib/postprocess.php" ; then
$SED -i -e 's/$this->processBooks();/\/\/$this->processBooks();/' $NEWZPATH/www/lib/postprocess.php
fi
if ! grep -q '//$this->processGames();' "$NEWZPATH/www/lib/postprocess.php" ; then
$SED -i -e 's/$this->processGames();/\/\/$this->processGames();/' $NEWZPATH/www/lib/postprocess.php
fi
if ! grep -q '//$this->processTv();' "$NEWZPATH/www/lib/postprocess.php" ; then
$SED -i -e 's/$this->processTv();/\/\/$this->processTv();/' $NEWZPATH/www/lib/postprocess.php
fi
if ! grep -q '//$this->processMusicFromMediaInfo();' "$NEWZPATH/www/lib/postprocess.php" ; then
$SED -i -e 's/$this->processMusicFromMediaInfo();/\/\/$this->processMusicFromMediaInfo();/' $NEWZPATH/www/lib/postprocess.php
fi
if ! grep -q '//$this->processOtherMiscCategory();' "$NEWZPATH/www/lib/postprocess.php" ; then
$SED -i -e 's/$this->processOtherMiscCategory();/\/\/$this->processOtherMiscCategory();/' $NEWZPATH/www/lib/postprocess.php
fi
if ! grep -q '//$this->processUnknownCategory();' "$NEWZPATH/www/lib/postprocess.php" ; then
$SED -i -e 's/$this->processUnknownCategory();/\/\/$this->processUnknownCategory();/' $NEWZPATH/www/lib/postprocess.php
fi
echo "Fixing permisions, this can take some time if you have a large set of releases"
chmod 777 $NEWZPATH/www/lib/smarty/templates_c
chmod -R 777 $NEWZPATH/www/covers