Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98341256
Install.sh
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Jan 12, 06:46
Size
1 KB
Mime Type
text/plain
Expires
Tue, Jan 14, 06:46 (1 d, 6 h)
Engine
blob
Format
Raw Data
Handle
23527989
Attached To
rLAMMPS lammps
Install.sh
View Options
# Install/unInstall package files in LAMMPS
# mode = 0/1/2 for uninstall/install/update
mode
=
$1
# arg1 = file, arg2 = file it depends on
action
()
{
if
(
test
$mode
=
0
)
then
rm -f ../
$1
elif
(
! cmp -s
$1
../
$1
)
then
if
(
test
-z
"$2"
||
test
-e ../
$2
)
then
cp
$1
..
if
(
test
$mode
=
2
)
then
echo
" updating src/$1"
fi
fi
elif
(
test
-n
"$2"
)
then
if
(
test
! -e ../
$2
)
then
rm -f ../
$1
fi
fi
}
# all package files with no dependencies
for
file in *.cpp *.h;
do
action
$file
done
# edit 2 Makefile.package files to include/exclude package info
if
(
test
$1
=
1
)
then
if
(
test
-e ../Makefile.package
)
then
sed -i -e
's/[^ \t]*atc[^ \t]* //'
../Makefile.package
sed -i -e
's|^PKG_INC =[ \t]*|&-I../../lib/atc -I../../src |'
../Makefile.package
sed -i -e
's|^PKG_PATH =[ \t]*|&-L../../lib/atc |'
../Makefile.package
# sed -i -e 's|^PKG_INC =[ \t]*|&-I../../lib/atc |' ../Makefile.package
# sed -i -e 's|^PKG_PATH =[ \t]*|&-L../../lib/atc$(LIBSOBJDIR) |' ../Makefile.package
sed -i -e
's|^PKG_LIB =[ \t]*|&-latc |'
../Makefile.package
sed -i -e
's|^PKG_SYSINC =[ \t]*|&$(user-atc_SYSINC) |'
../Makefile.package
sed -i -e
's|^PKG_SYSLIB =[ \t]*|&$(user-atc_SYSLIB) |'
../Makefile.package
sed -i -e
's|^PKG_SYSPATH =[ \t]*|&$(user-atc_SYSPATH) |'
../Makefile.package
fi
if
(
test
-e ../Makefile.package.settings
)
then
sed -i -e
'/^include.*atc.*$/d'
../Makefile.package.settings
# multiline form needed for BSD sed on Macs
sed -i -e
'4 i \
include ..\/..\/lib\/atc\/Makefile.lammps
'
../Makefile.package.settings
fi
elif
(
test
$1
=
0
)
then
if
(
test
-e ../Makefile.package
)
then
sed -i -e
's/[^ \t]*atc[^ \t]* //'
../Makefile.package
fi
if
(
test
-e ../Makefile.package.settings
)
then
sed -i -e
'/^include.*atc.*$/d'
../Makefile.package.settings
fi
fi
Event Timeline
Log In to Comment