Ticket #9433: trac_9433-scripts.v2-to-v3.patch

File trac_9433-scripts.v2-to-v3.patch, 14.4 KB (added by jhpalmieri, 9 years ago)

for reference only: diff between v2 and v3 patches.

  • sage-bdist

    # HG changeset patch
    # User J. H. Palmieri <palmieri@math.washington.edu>
    # Date 1285380944 25200
    # Node ID 85bd1001071ef11abcf4df35fcc2fafdbf7c634a
    # Parent  ce8367ad9d525b10c1565dc6b165633d6c3101b3
    #9433: for reference only.  diff between v2 and v3
    
    diff -r ce8367ad9d52 -r 85bd1001071e sage-bdist
    a b PKGDIR=spkg 
    1717
    1818CUR=`pwd`
    1919
    20 OPT="pPR"
     20CP_OPT="-pPR"
    2121
    2222if [ $# -ne 2 ]; then
    2323   echo "Usage: $0 <SAGE_VERSION> <SAGE_ROOT>"
    SAGE_VERSION=$1 
    2828SAGE_ROOT=$2
    2929export SAGE_VERSION SAGE_ROOT
    3030
    31 TARGET=sage-"$SAGE_VERSION"-`uname -m`-`uname`
     31TARGET=sage-$SAGE_VERSION-`uname -m`-`uname`
    3232TARGET=`echo $TARGET | sed -e 's/ //'`     #no blank spaces
    33 TMP="$CUR/tmp/$TARGET"
     33TMP=$CUR/tmp/$TARGET
    3434
    35 if [ ! -d "$CUR/tmp" ]; then
    36    mkdir "$CUR/tmp"
    37 fi
     35mkdir -p "$CUR/tmp"
    3836
    39 if [ -d "$TMP" ]; then
    40    rm -rf "$TMP"
    41 fi
    42 
     37rm -rf "$TMP"
    4338mkdir "$TMP"
    4439
    4540# copy sage root repo over:
    46 cd $SAGE_ROOT
     41cd "$SAGE_ROOT"
    4742
    4843echo "Copying root repository..."
    49 $SAGE_ROOT/sage --hg clone --pull . $TMP
     44"$SAGE_ROOT"/sage --hg clone --pull . "$TMP"
    5045
    5146if [ $? -ne 0 ]; then
    52     echo "Error copying sage root repository."
     47    echo "Error copying Sage root repository."
    5348    exit 1
    5449fi
    5550
    56 rm $TMP/.hg/hgrc
     51rm "$TMP"/.hg/hgrc
    5752echo "Done copying root repository."
    5853
    5954cd "$SAGE_ROOT"
    6055
    6156echo "Copying files over to tmp directory"
    62 cp -$OPT examples local data "$TMP"/
     57cp $CP_OPT examples local data "$TMP"/
    6358
    6459if [ -d devel/sage-main ]; then
    6560   echo "Copying Sage library over"
    6661   mkdir "$TMP"/devel/
    67    cp -L$OPT devel/sage-main "$TMP"/devel/sage-main
    68    cd $TMP/devel
     62   cp -L $CP_OPT devel/sage-main "$TMP"/devel/sage-main
     63   cd "$TMP"/devel
    6964   ln -s sage-main sage
    7065   cd sage
    7166   # Delete cython hash, so that "sage -br" works the first time.
    fi 
    7772
    7873cd "$SAGE_ROOT"
    7974
    80 if [ -d $PKGDIR ]; then
     75if [ -d "$PKGDIR" ]; then
    8176   echo "Making empty spkg's"
    82    cd $PKGDIR
    83    mkdir $TMP/$PKGDIR/build
    84    mkdir $TMP/$PKGDIR/optional
    85    cp -$OPT installed $TMP/$PKGDIR/
    86    cp -$OPT standard $TMP/$PKGDIR/
    87    cd $TMP/$PKGDIR/standard/
     77   cd "$PKGDIR"
     78   mkdir "$TMP/$PKGDIR"/build
     79   mkdir "$TMP/$PKGDIR"/optional
     80   cp $CP_OPT installed "$TMP/$PKGDIR/"
     81   cp $CP_OPT standard "$TMP/$PKGDIR/"
     82   cd "$TMP/$PKGDIR"/standard/
    8883   for F in `/bin/ls *.spkg`; do
    89        echo "Placeholder spkg file so this binary version of Sage knows this package version used when installing Sage." > $F
     84       echo "Placeholder spkg file so this binary version of Sage knows this package version used when installing Sage." > "$F"
    9085   done
    9186fi
    9287
    if [ "$UNAME" = "Darwin" ]; then 
    10196
    10297    if [ "$SAGE_APP_BUNDLE" = "yes" ]; then
    10398        echo 'Copying Sage.app'
    104         cp -L$OPT "$SAGE_ROOT/data/extcode/sage/ext/mac-app/Sage.app" ./Sage.app
     99        cp -L $CP_OPT "$SAGE_ROOT/data/extcode/sage/ext/mac-app/Sage.app" ./Sage.app
    105100        sed -i '' "s/SAGE_VERSION/$SAGE_VERSION/" \
    106101            ./Sage.app/Contents/Info.plist \
    107102            ./Sage.app/Contents/Resources/English.lproj/InfoPlist.strings
    if [ "$UNAME" = "Darwin" ]; then 
    120115    if [ "$SAGE_APP_DMG" != "no" ]; then
    121116        echo "Creating dmg"
    122117        echo "(If you don't wish to create a disk image please set SAGE_APP_DMG=no)"
    123         DYLD_LIBRARY_PATH=$SAGE_ORIG_DYLD_LIBRARY_PATH; export DYLD_LIBRARY_PATH
     118        DYLD_LIBRARY_PATH="$SAGE_ORIG_DYLD_LIBRARY_PATH"; export DYLD_LIBRARY_PATH
    124119        hdiutil create -srcfolder "$TARGET" -format UDBZ "$TARGET".dmg
    125120    else
    126121        echo 'If you wish to create a disk image please set'
    else 
    135130    tar zcvf "$TARGET".tar.gz "$TARGET"
    136131fi
    137132
    138 if [ ! -d $SAGE_ROOT/dist ]; then
    139     mkdir $SAGE_ROOT/dist
    140 fi
     133mkdir -p "$SAGE_ROOT"/dist
    141134
    142 if [ -d $SAGE_ROOT/dist/$TARGET ]; then
    143     rm -rf "$SAGE_ROOT/dist/$TARGET"
    144 fi
     135rm -rf "$SAGE_ROOT/dist/$TARGET"
    145136
    146137echo "Moving final distribution file to $SAGE_ROOT/dist"
    147138
    148 mv $TARGET $SAGE_ROOT/dist/
    149 mv $TARGET.* $SAGE_ROOT/dist/
     139mv "$TARGET" "$SAGE_ROOT"/dist/
     140mv "$TARGET".* "$SAGE_ROOT"/dist/
  • sage-make_devel_packages

    diff -r ce8367ad9d52 -r 85bd1001071e sage-make_devel_packages
    a b fi 
    1414
    1515SAGE_VERSION=$1
    1616SAGE_ROOT=$2
    17 SPKG_INST=$SAGE_ROOT/spkg/installed/
     17SPKG_INST="$SAGE_ROOT"/spkg/installed/
    1818export SAGE_ROOT SAGE_VERSION
    19 TARGET="sage-"$1
     19TARGET=sage-$1
    2020
    2121# REMOVE OLD PACKAGES
    2222cd "$SAGE_ROOT"/spkg/standard/
    else 
    3333   DESTINATION=$3
    3434fi
    3535
    36 if [ ! -d $DESTINATION ]; then
    37    mkdir $DESTINATION
     36if [ ! -d "$DESTINATION" ]; then
     37   mkdir "$DESTINATION"
    3838fi
    3939
    4040cd "$DESTINATION"
    4141DESTINATION=`pwd`
    42 PKG=$DESTINATION
     42PKG="$DESTINATION"
    4343
    4444# NEW SAGE SOURCE PACKAGE
    45 if [ -d $SAGE_ROOT/devel/sage-main ]; then
    46    cd $SAGE_ROOT/devel/sage-main
     45if [ -d "$SAGE_ROOT"/devel/sage-main ]; then
     46   cd "$SAGE_ROOT"/devel/sage-main
    4747   hg diff
    4848   hg status
    4949   hg tag "$SAGE_VERSION"
    5050   hg commit -m "$SAGE_VERSION"
    5151   #./sage-push
    5252   chmod +x spkg-dist
    53    ./spkg-dist $SAGE_VERSION $SAGE_ROOT
     53   ./spkg-dist "$SAGE_VERSION" "$SAGE_ROOT"
    5454   if [ $? -ne 0 ]; then
    55        echo "Error building the sage source code package"
     55       echo "Error building the Sage source code package"
    5656       exit 1
    5757   fi
    58    mv dist/sage-$SAGE_VERSION.spkg $DESTINATION/
    59    touch $SPKG_INST/sage-$SAGE_VERSION
     58   mv dist/sage-"$SAGE_VERSION".spkg "$DESTINATION"/
     59   touch "$SPKG_INST"/sage-"$SAGE_VERSION"
    6060fi
    6161
    62 if [ ! -f $PKG/sage-$SAGE_VERSION.spkg ]; then
     62if [ ! -f "$PKG"/sage-"$SAGE_VERSION".spkg ]; then
    6363    echo "The package sage-$SAGE_VERSION.spkg wasn't created."
    6464    exit 1
    6565fi
    6666
    6767# NEW SAGE EXTERNAL CODE PACKAGE
    68 if [ -d $SAGE_ROOT/data/extcode ]; then
    69    cd $SAGE_ROOT/data/extcode
     68if [ -d "$SAGE_ROOT"/data/extcode ]; then
     69   cd "$SAGE_ROOT"/data/extcode
    7070   hg diff
    7171   hg status
    7272   hg tag "$SAGE_VERSION"
    if [ -d $SAGE_ROOT/data/extcode ]; then 
    7474 
    7575   #./sage-push
    7676   chmod +x spkg-dist
    77    ./spkg-dist $SAGE_VERSION $SAGE_ROOT
     77   ./spkg-dist "$SAGE_VERSION" "$SAGE_ROOT"
    7878   if [ $? -ne 0 ]; then
    7979       echo "Error building the extcode package"
    8080       exit 1
    8181   fi
    82    mv extcode-$SAGE_VERSION.spkg $DESTINATION/
    83    touch $SPKG_INST/extcode-$SAGE_VERSION
     82   mv extcode-"$SAGE_VERSION".spkg "$DESTINATION"/
     83   touch "$SPKG_INST"/extcode-"$SAGE_VERSION"
    8484fi
    8585
    8686
    87 if [ ! -f $PKG/extcode-$SAGE_VERSION.spkg ]; then
     87if [ ! -f "$PKG"/extcode-"$SAGE_VERSION".spkg ]; then
    8888    echo "The package extcode-$SAGE_VERSION.spkg wasn't created."
    8989    exit 1
    9090fi
    9191
    9292# NEW SAGE EXAMPLE CODE PACKAGE
    93 if [ -d $SAGE_ROOT/examples ]; then
    94    cd $SAGE_ROOT/examples
     93if [ -d "$SAGE_ROOT"/examples ]; then
     94   cd "$SAGE_ROOT"/examples
    9595   hg diff
    9696   hg status
    9797   hg tag "$SAGE_VERSION"
    9898   hg commit -m "$SAGE_VERSION"
    9999   #./sage-push
    100100   cd ..
    101    rm -rf examples-$SAGE_VERSION
    102    cp -r examples examples-$SAGE_VERSION
    103    "$SAGE_ROOT"/sage -pkg examples-$SAGE_VERSION
     101   rm -rf examples-"$SAGE_VERSION"
     102   cp -r examples examples-"$SAGE_VERSION"
     103   "$SAGE_ROOT"/sage -pkg examples-"$SAGE_VERSION"
    104104   if [ $? -ne 0 ]; then
    105105       echo "Error building examples package"
    106106       exit 1
    107107   fi
    108    mv examples-$SAGE_VERSION.spkg $DESTINATION/
    109    rm -rf examples-$SAGE_VERSION
    110    touch $SPKG_INST/examples-$SAGE_VERSION
     108   mv examples-"$SAGE_VERSION".spkg "$DESTINATION"/
     109   rm -rf examples-"$SAGE_VERSION"
     110   touch "$SPKG_INST"/examples-"$SAGE_VERSION"
    111111fi
    112112
    113 if [ ! -f $PKG/examples-$SAGE_VERSION.spkg ]; then
     113if [ ! -f "$PKG"/examples-"$SAGE_VERSION".spkg ]; then
    114114    echo "The package examples-$SAGE_VERSION.spkg wasn't created."
    115115    exit 1
    116116fi
    fi 
    120120
    121121
    122122# NEW SAGE SCRIPTS PACKAGE
    123 SCRIPTS=sage_scripts-$SAGE_VERSION
    124 cd $SAGE_ROOT/local/bin/
     123SCRIPTS=sage_scripts-"$SAGE_VERSION"
     124cd "$SAGE_ROOT"/local/bin/
    125125
    126126#./sage-push
    127127hg diff
    if [ $? -ne 0 ]; then 
    134134    exit 1
    135135fi
    136136
    137 rm -rf $SCRIPTS
    138 mkdir $SCRIPTS
     137rm -rf "$SCRIPTS"
     138mkdir "$SCRIPTS"
    139139chmod +x sage-*
    140140chmod -x sage-README-osx.txt sage-banner sage-gdb-commands
    141141chmod -x sage-maxima.lisp sage-verify-pyc
    142142rm sage-*~
    143143
    144 cp -pr sage-* .hg* ipy_profile_sage.py $SCRIPTS/
    145 cp -p $SAGE_ROOT/local/bin/sage-spkg-install $SCRIPTS/spkg-install
    146 cp -p $SAGE_ROOT/local/bin/SbuildHack.pm $SCRIPTS/
    147 cp -p $SAGE_ROOT/local/bin/ncadoctest.py $SCRIPTS/
    148 cp -p $SAGE_ROOT/local/bin/sagedoctest.py $SCRIPTS/
     144cp -pr sage-* .hg* ipy_profile_sage.py "$SCRIPTS"/
     145cp -p "$SAGE_ROOT"/local/bin/sage-spkg-install "$SCRIPTS"/spkg-install
     146cp -p "$SAGE_ROOT"/local/bin/SbuildHack.pm "$SCRIPTS"/
     147cp -p "$SAGE_ROOT"/local/bin/ncadoctest.py "$SCRIPTS"/
     148cp -p "$SAGE_ROOT"/local/bin/sagedoctest.py "$SCRIPTS"/
    149149
    150 chmod +x $SCRIPTS/spkg-install
    151 tar -jcf $SCRIPTS.spkg $SCRIPTS
    152 mv $SCRIPTS.spkg $DESTINATION/
    153 rm -rf $SCRIPTS
    154 touch $SPKG_INST/sage_scripts-$SAGE_VERSION
     150chmod +x "$SCRIPTS"/spkg-install
     151tar -jcf "$SCRIPTS".spkg "$SCRIPTS"
     152mv "$SCRIPTS".spkg "$DESTINATION"/
     153rm -rf "$SCRIPTS"
     154touch "$SPKG_INST"/sage_scripts-"$SAGE_VERSION"
    155155
    156 if [ ! -f $PKG/sage_scripts-$SAGE_VERSION.spkg ]; then
     156if [ ! -f "$PKG/sage_scripts-$SAGE_VERSION.spkg" ]; then
    157157    echo "The package sage_scripts-$SAGE_VERSION.spkg wasn't created."
    158158    exit 1
    159159fi
    fi 
    163163# SAGE ROOT PACKAGE: sage-sdist already tags and commits the repo, so
    164164# we just need to build the spkg file.
    165165
    166 ROOT_REPO=sage_root-$SAGE_VERSION
    167 cd $SAGE_ROOT
     166ROOT_REPO=sage_root-"$SAGE_VERSION"
     167cd "$SAGE_ROOT"
    168168
    169 rm -rf $ROOT_REPO
    170 mkdir $ROOT_REPO
    171 cd $ROOT_REPO
     169rm -rf "$ROOT_REPO"
     170mkdir "$ROOT_REPO"
     171cd "$ROOT_REPO"
    172172
    173173echo "Copying root repository..."
    174 $SAGE_ROOT/sage --hg clone --pull $SAGE_ROOT .
     174"$SAGE_ROOT"/sage --hg clone --pull "$SAGE_ROOT" .
    175175
    176176if [ $? -ne 0 ]; then
    177     echo "Error copying sage root repository."
     177    echo "Error copying Sage root repository."
    178178    exit 1
    179179fi
    180180
    181181rm .hg/hgrc
    182 cd $SAGE_ROOT
     182cd "$SAGE_ROOT"
    183183
    184 cp -p $SAGE_ROOT/spkg/root-spkg-install $ROOT_REPO/spkg-install
    185 chmod +x $ROOT_REPO/spkg-install
     184cp -p "$SAGE_ROOT"/spkg/root-spkg-install "$ROOT_REPO"/spkg-install
     185chmod +x "$ROOT_REPO"/spkg-install
    186186
    187187echo "Done copying root repository."
    188188
    189 tar -jcf $ROOT_REPO.spkg $ROOT_REPO
    190 mv $ROOT_REPO.spkg $DESTINATION/
    191 rm -rf $ROOT_REPO
    192 touch $SPKG_INST/$ROOT_REPO
     189tar -jcf "$ROOT_REPO".spkg "$ROOT_REPO"
     190mv "$ROOT_REPO".spkg "$DESTINATION"/
     191rm -rf "$ROOT_REPO"
     192touch "$SPKG_INST/$ROOT_REPO"
    193193
    194 if [ ! -f $PKG/$ROOT_REPO.spkg ]; then
     194if [ ! -f "$PKG/$ROOT_REPO".spkg ]; then
    195195    echo "The package $ROOT_REPO.spkg wasn't created."
    196196    exit 1
    197197fi
  • sage-sdist

    diff -r ce8367ad9d52 -r 85bd1001071e sage-sdist
    a b SAGE_VERSION=$1 
    1616SAGE_ROOT=$2
    1717LD_LIBRARY_PATH="$SAGE_ROOT/local/lib:$LD_LIBRARY_PATH" && export LD_LIBRARY_PATH
    1818export SAGE_ROOT SAGE_VERSION
    19 TARGET="sage-"$1
     19TARGET="sage-$1"
    2020
    2121CUR=`pwd`
    2222
    2323
    2424# UPDATE SAGE VERSION FILE: this is done here so
    2525# the banner produced below this if block is correct.
    26 if [ -d $SAGE_ROOT/devel/sage/sage ]; then
    27    cd $SAGE_ROOT/devel/sage/sage
     26if [ -d "$SAGE_ROOT"/devel/sage/sage ]; then
     27   cd "$SAGE_ROOT"/devel/sage/sage
    2828   echo '"""nodoctests"""' > version.py
    2929   echo "version='"$SAGE_VERSION"'; date='`date '+%Y-%m-%d'`'" >> version.py
    30    cd $SAGE_ROOT/devel/sage
     30   cd "$SAGE_ROOT"/devel/sage
    3131   python setup.py install
    3232fi
    3333
    34 cd $SAGE_ROOT/local/bin/
     34cd "$SAGE_ROOT"/local/bin/
    3535echo "import sage.misc.banner; sage.misc.banner.banner()" | ./python > sage-banner
    3636
    3737cd "$CUR"
    3838
    39 cp $SAGE_ROOT/local/bin/sage-spkg $PKGDIR/base/
    40 cp $SAGE_ROOT/local/bin/sage-env  $PKGDIR/base/
    41 cp $SAGE_ROOT/local/bin/sage-make_relative $PKGDIR/base/
     39cp "$SAGE_ROOT"/local/bin/sage-spkg "$PKGDIR"/base/
     40cp "$SAGE_ROOT"/local/bin/sage-env  "$PKGDIR"/base/
     41cp "$SAGE_ROOT"/local/bin/sage-make_relative "$PKGDIR"/base/
    4242
    4343TMP="/tmp/$TARGET"
    4444
    45 if [ -d $TMP ]; then
    46    rm -rf "$TMP"
    47 fi
    48 
    49 mkdir $TMP
     45rm -rf "$TMP"
     46mkdir "$TMP"
    5047
    5148# copy sage root repo over.  Cloning needs to be done in an empty
    5249# directory, so we do this now.  The other sage repositories are dealt
    5350# with later.
    54 cd $SAGE_ROOT
     51cd "$SAGE_ROOT"
    5552
    5653hg diff
    5754hg status
    hg tag "$SAGE_VERSION" 
    5956hg commit -m "$SAGE_VERSION"
    6057
    6158echo "Copying root repository..."
    62 $SAGE_ROOT/sage --hg clone --pull . $TMP
     59"$SAGE_ROOT"/sage --hg clone --pull . "$TMP"
    6360
    6461if [ $? -ne 0 ]; then
    65     echo "Error copying sage root repository."
     62    echo "Error copying Sage root repository."
    6663    exit 1
    6764fi
    6865
    69 rm $TMP/.hg/hgrc
     66rm "$TMP"/.hg/hgrc
    7067echo "Done copying root repository."
    7168
    7269STD=standard
    73 cp -pr $PKGDIR/base $TMP/$PKGDIR/
     70cp -pr "$PKGDIR"/base "$TMP/$PKGDIR/"
    7471
    75 $SAGE_ROOT/local/bin/sage-make_devel_packages $SAGE_VERSION $SAGE_ROOT $TMP/devel
     72"$SAGE_ROOT"/local/bin/sage-make_devel_packages "$SAGE_VERSION" "$SAGE_ROOT" "$TMP"/devel
    7673
    7774if [ $? -ne 0 ]; then
    7875    echo "Error building the Sage packages."
    7976    exit 1
    8077fi
    8178
    82 cp $TMP/devel/*.spkg $SAGE_ROOT/$PKGDIR/$STD/
     79cp "$TMP"/devel/*.spkg "$SAGE_ROOT/$PKGDIR/$STD/"
    8380
    84 cp -p $PKGDIR/$STD/*.spkg $TMP/$PKGDIR/$STD/
     81cp -p "$PKGDIR/$STD"/*.spkg "$TMP/$PKGDIR/$STD/"
    8582
    86 cd $TMP/$PKGDIR/$STD
     83cd "$TMP/$PKGDIR/$STD"
    8784rm -rf doc-* sage-* extcode-* sage_scripts-* examples-*
    88 mv $TMP/devel/*.spkg .
    89 rmdir $TMP/devel
     85mv "$TMP"/devel/*.spkg .
     86rmdir "$TMP"/devel
    9087
    9188cd /tmp
    92 tar cf $TARGET.tar $TARGET
     89tar cf "$TARGET".tar "$TARGET"
    9390
    94 if [ ! -d $SAGE_ROOT/dist ]; then
    95     mkdir $SAGE_ROOT/dist
    96 fi
     91mkdir -p "$SAGE_ROOT"/dist
    9792
    98 if [ -d $SAGE_ROOT/dist/$TARGET ]; then
    99     rm -rf "$SAGE_ROOT/dist/$TARGET"
    100 fi
     93rm -rf "$SAGE_ROOT/dist/$TARGET"
    10194
    102 mv $TARGET $SAGE_ROOT/dist/
    103 mv $TARGET.tar $SAGE_ROOT/dist/
     95mv "$TARGET" "$SAGE_ROOT"/dist/
     96mv "$TARGET".tar "$SAGE_ROOT"/dist/
  • sage-spkg-install

    diff -r ce8367ad9d52 -r 85bd1001071e sage-spkg-install
    a b  
    22
    33CUR=`pwd`
    44
    5 TARGET="$SAGE_ROOT"/local/bin/
     5TARGET=$SAGE_ROOT/local/bin/
    66
    77if [ -d "$TARGET"/.hg ]; then
    88
  • sage-upgrade

    diff -r ce8367ad9d52 -r 85bd1001071e sage-upgrade
    a b fi 
    2424# Got all new packages, and ready to go.  Now actually do the install.
    2525# First install the sage_root repo, then run the install script to do
    2626# the others.
    27 cd $SAGE_ROOT/spkg/
    28 newest="$SAGE_ROOT/spkg/standard/newest_version"
     27cd "$SAGE_ROOT"/spkg/
     28newest=$SAGE_ROOT/spkg/standard/newest_version
    2929ROOT_REPO=`$newest sage_root`
    3030
    3131echo $ROOT_REPO
    3232
    33 ./pipestatus "sage-spkg $ROOT_REPO 2>&1" "tee -a $SAGE_ROOT/spkg/logs/$ROOT_REPO.log"
     33./pipestatus "sage-spkg $ROOT_REPO 2>&1" "tee -a '$SAGE_ROOT'/spkg/logs/$ROOT_REPO.log"
     34
     35if [ $? -ne 0 ]; then
     36    echo "Error installing Sage root repository."
     37    exit 1
     38fi
    3439
    3540./install
    3641