Skip to content
Snippets Groups Projects
Commit 91b1ff1e authored by jdh8d's avatar jdh8d
Browse files

updates to be able to 'release' protected programs

Former-commit-id: 4b73bb089886c79e78a8daa6f4b4cc2f362cc467
parent 994bc00a
No related branches found
No related tags found
No related merge requests found
......@@ -167,6 +167,7 @@ tools/ps_comp.sh -text
tools/ps_create_installer.sh -text
tools/ps_install.stmpl -text
tools/ps_link.sh -text
tools/ps_release.sh -text
tools/ps_run.sh -text
tools/ps_scrub.sh -text
tools/ps_tne_scripts/README -text
......
#!/bin/bash
# Script to scrub PEASOUP directory
usage()
{
echo "usage: $0 [ <peasoup_program> | <peasoup_dir> ]"
exit 1
}
error()
{
echo "$0: $1"
echo
usage
}
verify_peasoup_dir()
{
ls $1 | grep ps_run > /dev/null 2>&1
if [ ! $? -eq 0 ]; then
error "$1 not a valid peasoup directory"
fi
}
verify_peasoup_app()
{
grep ps_run $1 > /dev/null 2>&1
if [ ! $? -eq 0 ]; then
error "$1 not a valid peasoup program"
fi
}
assert_files()
{
for i in $1; do
if [ ! -f $i ]; then
echo "Missing file: $i"
exit 1
fi
done
}
remove_rest()
{
keepers=$*
for j in `ls`; do
found=0
for i in $keepers; do
if [ $i = $j ]; then
found=1
fi
done
if [ $found = 0 ]; then
echo Removing $j
if [ -d $j ]; then
rm -Rf $j
else
rm -f $j
fi
else
echo Keeping $j
fi
done
}
#
# sanity checks before scrubbing directory
#
if [ -d $1 ]; then
peasoup_dir=$1
verify_peasoup_dir $peasoup_dir
else
verify_peasoup_app $1
peasoup_dir=`grep ps_run $1 | cut -d' ' -f3`
verify_peasoup_dir $peasoup_dir
fi
echo "Preparing directory for release: $peasoup_dir"
cd $peasoup_dir
files_to_keep="a.ncexe.annot
a.stratafied
a.irdb.fbspri.reloc
a.stratafied
a.stratafied.data_dataListFile
a.stratafied.data_hashFile
a.stratafied.data_hash.ini
a.stratafied.data_keyValueFile
a.stratafied.data_libListFile
a.stratafied.map_hashFile
a.stratafied.map_hash.ini
a.stratafied.map_keyValueFile
a.stratafied.map_libListFile
a.stratafied.term_map_hashFile
a.stratafied.term_map_hash.ini
a.stratafied.term_map_keyValueFile
diagnostics.out
libappfw.so
libstrata.so
ps_run.sh
"
remove_rest $files_to_keep
assert_files $files_to_keep
......@@ -62,12 +62,12 @@ fi
#
# Set SPRI file to use (should be generated from the IRDB).
#
if [ -f $datapath/a.irdb.fbspri ]; then
# check for faster versions of the spri file first
if [ -f $datapath/a.irdb.fbspri -o $datapath/a.irdb.fbspri.reloc ]; then
command="STRATA_SPRI_FILE=$datapath/a.irdb.fbspri $command"
else
if [ -f $datapath/a.irdb.bspri ]; then
# default to the slow one
elif [ -f $datapath/a.irdb.bspri ]; then
command="STRATA_SPRI_FILE=$datapath/a.irdb.bspri $command"
fi
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment