mirror of
https://github.com/rembo10/headphones.git
synced 2026-01-09 22:57:58 -05:00
Fixed contrib scripts. Added *.pyc cleaning scripts
This commit is contained in:
9
contrib/clean_pyc.sh
Executable file
9
contrib/clean_pyc.sh
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Display information
|
||||||
|
echo "This script will remove *.pyc files. These files are generated by Python, but they can cause conflicts after an upgrade. It's safe to remove them, because they will be regenerated."
|
||||||
|
echo "Press enter to continue, or CTRL + C to quit."
|
||||||
|
read
|
||||||
|
|
||||||
|
# Remove the *.pyc
|
||||||
|
find "`dirname $0`/.." -type f -name "*.pyc" -exec rm -rf {} \;
|
||||||
@@ -1,14 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Parameter check
|
# Parameter check
|
||||||
if [ -z "$1" ] || [ -z "$2" ]; then
|
if [ -z "$1" ]; then
|
||||||
echo "Syntax: $0 <source directory> <data directory>"
|
echo "Syntax: $0 <data directory>"
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Repository check
|
|
||||||
if [ ! -d "$1/.git" ]; then
|
|
||||||
echo "This script can only downgrade Headphones installations via Git."
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -19,7 +13,7 @@ if [ ! -s "$2/version.lock" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Git installation check
|
# Git installation check
|
||||||
if [ ! -x "$(command -v wget)" ]; then
|
if [ ! -x "$(command -v git)" ]; then
|
||||||
echo "Git is required to downgrade."
|
echo "Git is required to downgrade."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -32,7 +26,7 @@ echo "Press enter to continue, or CTRL + C to quit."
|
|||||||
read
|
read
|
||||||
|
|
||||||
# Downgrade
|
# Downgrade
|
||||||
cd "$1"
|
cd "`dirname $0`/.."
|
||||||
git reset --hard "$HASH"
|
git reset --hard "$HASH"
|
||||||
|
|
||||||
echo "All done, Headphones should be downgraded to the last version that started."
|
echo "All done, Headphones should be downgraded to the last version that started."
|
||||||
Reference in New Issue
Block a user